repository-provider 35.2.13 → 35.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/README.md +22 -14
- package/package.json +5 -5
- package/src/base-provider.mjs +21 -13
- package/types/base-provider.d.mts +41 -17
package/README.md
CHANGED
|
@@ -183,6 +183,7 @@ console.log(await readme.string);
|
|
|
183
183
|
* [Properties](#properties-2)
|
|
184
184
|
* [name](#name-2)
|
|
185
185
|
* [messageDestination](#messagedestination-1)
|
|
186
|
+
* [parsedName](#parsedname)
|
|
186
187
|
* [Branch](#branch)
|
|
187
188
|
* [Parameters](#parameters-43)
|
|
188
189
|
* [Properties](#properties-3)
|
|
@@ -747,7 +748,7 @@ Like .git suffix or #branch names.
|
|
|
747
748
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
748
749
|
* `forLookup` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
749
750
|
|
|
750
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** normalized name
|
|
751
|
+
Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** normalized name
|
|
751
752
|
|
|
752
753
|
### normalizeGroupName
|
|
753
754
|
|
|
@@ -759,7 +760,7 @@ Like .git suffix or #branch names.
|
|
|
759
760
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
760
761
|
* `forLookup` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
761
762
|
|
|
762
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** normalized name
|
|
763
|
+
Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** normalized name
|
|
763
764
|
|
|
764
765
|
### areRepositoryNamesCaseSensitive
|
|
765
766
|
|
|
@@ -785,8 +786,6 @@ base, group, repository and branch.
|
|
|
785
786
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
|
|
786
787
|
* `focus` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** where lies the focus if only one path component is given (optional, default `"repository"`)
|
|
787
788
|
|
|
788
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** with separated attributes
|
|
789
|
-
|
|
790
789
|
### createRepository
|
|
791
790
|
|
|
792
791
|
Create a repository.
|
|
@@ -807,6 +806,8 @@ List provider objects of a given type.
|
|
|
807
806
|
* `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the method to deliver typed iterator projects,milestones,hooks,repositories,branches,tags
|
|
808
807
|
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** group / repository filter
|
|
809
808
|
|
|
809
|
+
Returns **AsyncIterable<([Repository](#repository) | [PullRequest](#pullrequest) | [Branch](#branch) | [Tag](#tag) | [Project](#project) | [Milestone](#milestone) | [Hook](#hook))>** all matching repositories of the providers
|
|
810
|
+
|
|
810
811
|
### projects
|
|
811
812
|
|
|
812
813
|
List projects.
|
|
@@ -815,7 +816,7 @@ List projects.
|
|
|
815
816
|
|
|
816
817
|
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
817
818
|
|
|
818
|
-
Returns **
|
|
819
|
+
Returns **AsyncIterable<[Project](#project)>** all matching projects of the provider
|
|
819
820
|
|
|
820
821
|
### milestones
|
|
821
822
|
|
|
@@ -825,7 +826,7 @@ List milestones.
|
|
|
825
826
|
|
|
826
827
|
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
827
828
|
|
|
828
|
-
Returns **
|
|
829
|
+
Returns **AsyncIterable<[Milestone](#milestone)>** all matching milestones of the provider
|
|
829
830
|
|
|
830
831
|
### repositories
|
|
831
832
|
|
|
@@ -892,7 +893,8 @@ Returns **[BaseProvider](#baseprovider)** this
|
|
|
892
893
|
### toJSON
|
|
893
894
|
|
|
894
895
|
List all defined entries from attributes.
|
|
895
|
-
|
|
896
|
+
|
|
897
|
+
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
896
898
|
|
|
897
899
|
### instanceIdentifier
|
|
898
900
|
|
|
@@ -953,6 +955,7 @@ Returns **([BaseProvider](#baseprovider) | [undefined](https://developer.mozilla
|
|
|
953
955
|
|
|
954
956
|
* `messageDestination` **[MessageDestination](#messagedestination)** 
|
|
955
957
|
* `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
958
|
+
* `api` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
956
959
|
|
|
957
960
|
### equals
|
|
958
961
|
|
|
@@ -996,7 +999,7 @@ Like .git suffix or #branch names.
|
|
|
996
999
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
997
1000
|
* `forLookup` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
998
1001
|
|
|
999
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** normalized name
|
|
1002
|
+
Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** normalized name
|
|
1000
1003
|
|
|
1001
1004
|
### normalizeGroupName
|
|
1002
1005
|
|
|
@@ -1008,7 +1011,7 @@ Like .git suffix or #branch names.
|
|
|
1008
1011
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1009
1012
|
* `forLookup` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
1010
1013
|
|
|
1011
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** normalized name
|
|
1014
|
+
Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** normalized name
|
|
1012
1015
|
|
|
1013
1016
|
### areRepositoryNamesCaseSensitive
|
|
1014
1017
|
|
|
@@ -1034,8 +1037,6 @@ base, group, repository and branch.
|
|
|
1034
1037
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
|
|
1035
1038
|
* `focus` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** where lies the focus if only one path component is given (optional, default `"repository"`)
|
|
1036
1039
|
|
|
1037
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** with separated attributes
|
|
1038
|
-
|
|
1039
1040
|
### createRepository
|
|
1040
1041
|
|
|
1041
1042
|
Create a repository.
|
|
@@ -1056,6 +1057,8 @@ List provider objects of a given type.
|
|
|
1056
1057
|
* `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the method to deliver typed iterator projects,milestones,hooks,repositories,branches,tags
|
|
1057
1058
|
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** group / repository filter
|
|
1058
1059
|
|
|
1060
|
+
Returns **AsyncIterable<([Repository](#repository) | [PullRequest](#pullrequest) | [Branch](#branch) | [Tag](#tag) | [Project](#project) | [Milestone](#milestone) | [Hook](#hook))>** all matching repositories of the providers
|
|
1061
|
+
|
|
1059
1062
|
### projects
|
|
1060
1063
|
|
|
1061
1064
|
List projects.
|
|
@@ -1064,7 +1067,7 @@ List projects.
|
|
|
1064
1067
|
|
|
1065
1068
|
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1066
1069
|
|
|
1067
|
-
Returns **
|
|
1070
|
+
Returns **AsyncIterable<[Project](#project)>** all matching projects of the provider
|
|
1068
1071
|
|
|
1069
1072
|
### milestones
|
|
1070
1073
|
|
|
@@ -1074,7 +1077,7 @@ List milestones.
|
|
|
1074
1077
|
|
|
1075
1078
|
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1076
1079
|
|
|
1077
|
-
Returns **
|
|
1080
|
+
Returns **AsyncIterable<[Milestone](#milestone)>** all matching milestones of the provider
|
|
1078
1081
|
|
|
1079
1082
|
### repositories
|
|
1080
1083
|
|
|
@@ -1141,7 +1144,8 @@ Returns **[BaseProvider](#baseprovider)** this
|
|
|
1141
1144
|
### toJSON
|
|
1142
1145
|
|
|
1143
1146
|
List all defined entries from attributes.
|
|
1144
|
-
|
|
1147
|
+
|
|
1148
|
+
Returns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
1145
1149
|
|
|
1146
1150
|
### instanceIdentifier
|
|
1147
1151
|
|
|
@@ -1207,6 +1211,10 @@ Name of the provider.
|
|
|
1207
1211
|
|
|
1208
1212
|
To forward info/warn and error messages to
|
|
1209
1213
|
|
|
1214
|
+
## parsedName
|
|
1215
|
+
|
|
1216
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1217
|
+
|
|
1210
1218
|
## Branch
|
|
1211
1219
|
|
|
1212
1220
|
* **See**: [Repository#\_addBranch](Repository#_addBranch)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "35.2.
|
|
3
|
+
"version": "35.2.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"content-entry": "^9.0.
|
|
39
|
+
"content-entry": "^9.0.1",
|
|
40
40
|
"matching-iterator": "^2.1.3",
|
|
41
41
|
"pacc": "^3.1.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"ava": "^6.1.
|
|
45
|
-
"browser-ava": "^2.2.
|
|
44
|
+
"ava": "^6.1.2",
|
|
45
|
+
"browser-ava": "^2.2.2",
|
|
46
46
|
"c8": "^9.1.0",
|
|
47
47
|
"documentation": "^14.0.3",
|
|
48
|
-
"repository-provider-test-support": "^3.1.
|
|
48
|
+
"repository-provider-test-support": "^3.1.4",
|
|
49
49
|
"semantic-release": "^23.0.2",
|
|
50
50
|
"typescript": "^5.3.3"
|
|
51
51
|
},
|
package/src/base-provider.mjs
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
default_attribute
|
|
16
16
|
} from "./attributes.mjs";
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* @typedef {import('./project.mjs').Project} Project
|
|
20
|
-
* @typedef {import('./milestone.mjs').Milestone} Milestone
|
|
21
|
-
*/
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {import('./project.mjs').Project} Project
|
|
20
|
+
* @typedef {import('./milestone.mjs').Milestone} Milestone
|
|
21
|
+
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @typedef {Object} MessageDestination
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
* @param {MessageDestination} [options.messageDestination]
|
|
37
37
|
* @property {MessageDestination} messageDestination
|
|
38
38
|
* @property {string} url
|
|
39
|
+
* @property {string} api
|
|
39
40
|
*/
|
|
40
41
|
export class BaseProvider extends BaseObject {
|
|
41
42
|
static get type() {
|
|
@@ -143,6 +144,11 @@ export class BaseProvider extends BaseObject {
|
|
|
143
144
|
return 0;
|
|
144
145
|
}
|
|
145
146
|
|
|
147
|
+
/**
|
|
148
|
+
* @typedef {Object} parsedName
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
|
|
146
152
|
/**
|
|
147
153
|
* Creates a new provider for a given set of options.
|
|
148
154
|
* @param {Object} options additional options
|
|
@@ -163,7 +169,7 @@ export class BaseProvider extends BaseObject {
|
|
|
163
169
|
}
|
|
164
170
|
|
|
165
171
|
/**
|
|
166
|
-
* @param {any} other
|
|
172
|
+
* @param {any} other
|
|
167
173
|
* @return {boolean} true if other provider is the same as the receiver
|
|
168
174
|
*/
|
|
169
175
|
equals(other) {
|
|
@@ -199,11 +205,11 @@ export class BaseProvider extends BaseObject {
|
|
|
199
205
|
* Like .git suffix or #branch names.
|
|
200
206
|
* @param {string} name
|
|
201
207
|
* @param {boolean} forLookup
|
|
202
|
-
* @return {string} normalized name
|
|
208
|
+
* @return {string|undefined} normalized name
|
|
203
209
|
*/
|
|
204
210
|
normalizeRepositoryName(name, forLookup) {
|
|
205
211
|
const { repository } = this.parseName(name);
|
|
206
|
-
return forLookup && !this.areRepositoryNamesCaseSensitive
|
|
212
|
+
return repository && forLookup && !this.areRepositoryNamesCaseSensitive
|
|
207
213
|
? repository.toLowerCase()
|
|
208
214
|
: repository;
|
|
209
215
|
}
|
|
@@ -213,7 +219,7 @@ export class BaseProvider extends BaseObject {
|
|
|
213
219
|
* Like .git suffix or #branch names.
|
|
214
220
|
* @param {string} name
|
|
215
221
|
* @param {boolean} forLookup
|
|
216
|
-
* @return {string} normalized name
|
|
222
|
+
* @return {string|undefined} normalized name
|
|
217
223
|
*/
|
|
218
224
|
normalizeGroupName(name, forLookup) {
|
|
219
225
|
const { group } = this.parseName(name, "group");
|
|
@@ -245,12 +251,13 @@ export class BaseProvider extends BaseObject {
|
|
|
245
251
|
* base, group, repository and branch.
|
|
246
252
|
* @param {string} [name]
|
|
247
253
|
* @param {string} focus where lies the focus if only one path component is given
|
|
248
|
-
* @return {
|
|
254
|
+
* @return {{base: string|undefined, group: string|undefined, repository: string|undefined, branch: string|undefined}} with separated attributes
|
|
249
255
|
*/
|
|
250
256
|
parseName(name, focus = "repository") {
|
|
251
257
|
const result = {};
|
|
252
258
|
|
|
253
259
|
if (name === undefined) {
|
|
260
|
+
// @ts-ignore
|
|
254
261
|
return result;
|
|
255
262
|
}
|
|
256
263
|
|
|
@@ -295,6 +302,7 @@ export class BaseProvider extends BaseObject {
|
|
|
295
302
|
}
|
|
296
303
|
}
|
|
297
304
|
|
|
305
|
+
// @ts-ignore
|
|
298
306
|
return result;
|
|
299
307
|
}
|
|
300
308
|
|
|
@@ -310,7 +318,7 @@ export class BaseProvider extends BaseObject {
|
|
|
310
318
|
const rg = await this.repositoryGroup(group);
|
|
311
319
|
return rg.createRepository(repository, options);
|
|
312
320
|
}
|
|
313
|
-
|
|
321
|
+
|
|
314
322
|
/**
|
|
315
323
|
* List provider objects of a given type.
|
|
316
324
|
*
|
|
@@ -343,7 +351,7 @@ export class BaseProvider extends BaseObject {
|
|
|
343
351
|
/**
|
|
344
352
|
* List projects.
|
|
345
353
|
* @param {string[]|string} [patterns]
|
|
346
|
-
* @return {
|
|
354
|
+
* @return {AsyncIterable<Project>} all matching projects of the provider
|
|
347
355
|
*/
|
|
348
356
|
async *projects(patterns) {
|
|
349
357
|
// @ts-ignore
|
|
@@ -353,7 +361,7 @@ export class BaseProvider extends BaseObject {
|
|
|
353
361
|
/**
|
|
354
362
|
* List milestones.
|
|
355
363
|
* @param {string[]|string} [patterns]
|
|
356
|
-
* @return {
|
|
364
|
+
* @return {AsyncIterable<Milestone>} all matching milestones of the provider
|
|
357
365
|
*/
|
|
358
366
|
async *milestones(patterns) {
|
|
359
367
|
// @ts-ignore
|
|
@@ -428,7 +436,7 @@ export class BaseProvider extends BaseObject {
|
|
|
428
436
|
|
|
429
437
|
/**
|
|
430
438
|
* List all defined entries from attributes.
|
|
431
|
-
* return {object}
|
|
439
|
+
* @return {object}
|
|
432
440
|
*/
|
|
433
441
|
toJSON() {
|
|
434
442
|
const json = { name: this.name };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {import('./project.mjs').Project} Project
|
|
3
|
-
* @typedef {import('./milestone.mjs').Milestone} Milestone
|
|
4
|
-
*/
|
|
2
|
+
* @typedef {import('./project.mjs').Project} Project
|
|
3
|
+
* @typedef {import('./milestone.mjs').Milestone} Milestone
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
6
|
* @typedef {Object} MessageDestination
|
|
7
7
|
* Endpoint to deliver log messages to.
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* @param {MessageDestination} [options.messageDestination]
|
|
18
18
|
* @property {MessageDestination} messageDestination
|
|
19
19
|
* @property {string} url
|
|
20
|
+
* @property {string} api
|
|
20
21
|
*/
|
|
21
22
|
export class BaseProvider extends BaseObject {
|
|
22
23
|
/**
|
|
@@ -56,6 +57,14 @@ export class BaseProvider extends BaseObject {
|
|
|
56
57
|
description?: string;
|
|
57
58
|
default?: any;
|
|
58
59
|
set?: Function;
|
|
60
|
+
/**
|
|
61
|
+
* Extract options suitable for the constructor.
|
|
62
|
+
* Form the given set of environment variables.
|
|
63
|
+
* Object with the detected key value pairs is delivered.
|
|
64
|
+
* @param {Object} [env] as from process.env
|
|
65
|
+
* @param {string} instanceIdentifier part of variable name.
|
|
66
|
+
* @return {Object|undefined} undefined if no suitable environment variables have been found
|
|
67
|
+
*/
|
|
59
68
|
get?: Function;
|
|
60
69
|
};
|
|
61
70
|
url: import("pacc").AttributeDefinition;
|
|
@@ -75,10 +84,22 @@ export class BaseProvider extends BaseObject {
|
|
|
75
84
|
additionalAttributes: string[];
|
|
76
85
|
description?: string;
|
|
77
86
|
set?: Function;
|
|
87
|
+
/**
|
|
88
|
+
* Extract options suitable for the constructor.
|
|
89
|
+
* Form the given set of environment variables.
|
|
90
|
+
* Object with the detected key value pairs is delivered.
|
|
91
|
+
* @param {Object} [env] as from process.env
|
|
92
|
+
* @param {string} instanceIdentifier part of variable name.
|
|
93
|
+
* @return {Object|undefined} undefined if no suitable environment variables have been found
|
|
94
|
+
*/
|
|
78
95
|
get?: Function;
|
|
79
96
|
env?: string | string[];
|
|
80
97
|
};
|
|
81
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* @typedef {Object} parsedName
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
82
103
|
/**
|
|
83
104
|
* Creates a new provider for a given set of options.
|
|
84
105
|
* @param {Object} options additional options
|
|
@@ -120,17 +141,17 @@ export class BaseProvider extends BaseObject {
|
|
|
120
141
|
* Like .git suffix or #branch names.
|
|
121
142
|
* @param {string} name
|
|
122
143
|
* @param {boolean} forLookup
|
|
123
|
-
* @return {string} normalized name
|
|
144
|
+
* @return {string|undefined} normalized name
|
|
124
145
|
*/
|
|
125
|
-
normalizeRepositoryName(name: string, forLookup: boolean): string;
|
|
146
|
+
normalizeRepositoryName(name: string, forLookup: boolean): string | undefined;
|
|
126
147
|
/**
|
|
127
148
|
* Bring a group name into its normal form by removing any clutter.
|
|
128
149
|
* Like .git suffix or #branch names.
|
|
129
150
|
* @param {string} name
|
|
130
151
|
* @param {boolean} forLookup
|
|
131
|
-
* @return {string} normalized name
|
|
152
|
+
* @return {string|undefined} normalized name
|
|
132
153
|
*/
|
|
133
|
-
normalizeGroupName(name: string, forLookup: boolean): string;
|
|
154
|
+
normalizeGroupName(name: string, forLookup: boolean): string | undefined;
|
|
134
155
|
/**
|
|
135
156
|
* Are repository names case sensitive.
|
|
136
157
|
* Overwrite and return false if you want to have case insensitive repository lookup.
|
|
@@ -148,9 +169,14 @@ export class BaseProvider extends BaseObject {
|
|
|
148
169
|
* base, group, repository and branch.
|
|
149
170
|
* @param {string} [name]
|
|
150
171
|
* @param {string} focus where lies the focus if only one path component is given
|
|
151
|
-
* @return {
|
|
172
|
+
* @return {{base: string|undefined, group: string|undefined, repository: string|undefined, branch: string|undefined}} with separated attributes
|
|
152
173
|
*/
|
|
153
|
-
parseName(name?: string, focus?: string):
|
|
174
|
+
parseName(name?: string, focus?: string): {
|
|
175
|
+
base: string | undefined;
|
|
176
|
+
group: string | undefined;
|
|
177
|
+
repository: string | undefined;
|
|
178
|
+
branch: string | undefined;
|
|
179
|
+
};
|
|
154
180
|
/**
|
|
155
181
|
* Create a repository.
|
|
156
182
|
* @param {string} name of group and repository
|
|
@@ -169,15 +195,15 @@ export class BaseProvider extends BaseObject {
|
|
|
169
195
|
/**
|
|
170
196
|
* List projects.
|
|
171
197
|
* @param {string[]|string} [patterns]
|
|
172
|
-
* @return {
|
|
198
|
+
* @return {AsyncIterable<Project>} all matching projects of the provider
|
|
173
199
|
*/
|
|
174
|
-
projects(patterns?: string[] | string):
|
|
200
|
+
projects(patterns?: string[] | string): AsyncIterable<Project>;
|
|
175
201
|
/**
|
|
176
202
|
* List milestones.
|
|
177
203
|
* @param {string[]|string} [patterns]
|
|
178
|
-
* @return {
|
|
204
|
+
* @return {AsyncIterable<Milestone>} all matching milestones of the provider
|
|
179
205
|
*/
|
|
180
|
-
milestones(patterns?: string[] | string):
|
|
206
|
+
milestones(patterns?: string[] | string): AsyncIterable<Milestone>;
|
|
181
207
|
/**
|
|
182
208
|
* List repositories.
|
|
183
209
|
* @param {string[]|string} [patterns]
|
|
@@ -220,11 +246,9 @@ export class BaseProvider extends BaseObject {
|
|
|
220
246
|
get provider(): BaseProvider;
|
|
221
247
|
/**
|
|
222
248
|
* List all defined entries from attributes.
|
|
223
|
-
* return {object}
|
|
249
|
+
* @return {object}
|
|
224
250
|
*/
|
|
225
|
-
toJSON():
|
|
226
|
-
name: string;
|
|
227
|
-
};
|
|
251
|
+
toJSON(): object;
|
|
228
252
|
initializeRepositories(): void;
|
|
229
253
|
trace(...args: any[]): any;
|
|
230
254
|
debug(...args: any[]): any;
|