repository-provider 25.5.5 → 25.5.9
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 +16 -6
- package/package.json +5 -5
- package/src/base-provider.mjs +6 -0
- package/src/branch.mjs +1 -1
- package/src/ref.mjs +16 -4
package/README.md
CHANGED
|
@@ -123,6 +123,8 @@ console.log(await readme.getString());
|
|
|
123
123
|
* [initialize](#initialize)
|
|
124
124
|
* [Parameters](#parameters-26)
|
|
125
125
|
* [priority](#priority)
|
|
126
|
+
* [name](#name-1)
|
|
127
|
+
* [messageDestination](#messagedestination-1)
|
|
126
128
|
* [Commit](#commit)
|
|
127
129
|
* [Properties](#properties-2)
|
|
128
130
|
* [Commit](#commit-1)
|
|
@@ -774,6 +776,14 @@ Returns **Provider** newly created provider or undefined if options are not suff
|
|
|
774
776
|
In case there are several provider able to support a given source which one sould be used ?
|
|
775
777
|
this defines the order
|
|
776
778
|
|
|
779
|
+
## name
|
|
780
|
+
|
|
781
|
+
Name of the provider
|
|
782
|
+
|
|
783
|
+
## messageDestination
|
|
784
|
+
|
|
785
|
+
to forward info/warn and error messages to
|
|
786
|
+
|
|
777
787
|
## Commit
|
|
778
788
|
|
|
779
789
|
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
@@ -850,7 +860,7 @@ Commit entries.
|
|
|
850
860
|
#### Parameters
|
|
851
861
|
|
|
852
862
|
* `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** commit message
|
|
853
|
-
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<
|
|
863
|
+
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<ContentEntry>** content to be commited
|
|
854
864
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
855
865
|
|
|
856
866
|
Returns **[CommitResult](#commitresult)**
|
|
@@ -1296,13 +1306,13 @@ List entries of the branch.
|
|
|
1296
1306
|
|
|
1297
1307
|
* `matchingPatterns` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
|
|
1298
1308
|
|
|
1299
|
-
Returns **
|
|
1309
|
+
Returns **ContentEntry** all matching entries in the branch
|
|
1300
1310
|
|
|
1301
1311
|
### asyncIterator
|
|
1302
1312
|
|
|
1303
1313
|
List all entries of the branch.
|
|
1304
1314
|
|
|
1305
|
-
Returns **asyncIterator\<
|
|
1315
|
+
Returns **asyncIterator\<ContentEntry>** all entries in the branch
|
|
1306
1316
|
|
|
1307
1317
|
### maybeEntry
|
|
1308
1318
|
|
|
@@ -1312,7 +1322,7 @@ Get exactly one matching entry by name or undefine if no such entry is found.
|
|
|
1312
1322
|
|
|
1313
1323
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1314
1324
|
|
|
1315
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
|
|
1325
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ContentEntry>**
|
|
1316
1326
|
|
|
1317
1327
|
### entry
|
|
1318
1328
|
|
|
@@ -1322,7 +1332,7 @@ Get exactly one matching entry by name (throws if entry is not found).
|
|
|
1322
1332
|
|
|
1323
1333
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1324
1334
|
|
|
1325
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
|
|
1335
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ContentEntry>**
|
|
1326
1336
|
|
|
1327
1337
|
### provider
|
|
1328
1338
|
|
|
@@ -1472,7 +1482,7 @@ api url
|
|
|
1472
1482
|
|
|
1473
1483
|
## RepositoryOwner
|
|
1474
1484
|
|
|
1475
|
-
Mixin to define a class able to handle a collection of
|
|
1485
|
+
Mixin to define a class able to handle a collection of repositories.
|
|
1476
1486
|
|
|
1477
1487
|
### Parameters
|
|
1478
1488
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "25.5.
|
|
3
|
+
"version": "25.5.9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./src/index.mjs"
|
|
10
10
|
},
|
|
11
|
-
"description": "abstract interface to git repository providers like github bitbucket",
|
|
11
|
+
"description": "abstract interface to git repository providers like github, bitbucket and gitlab",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"git",
|
|
14
14
|
"repository-provider"
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"ava": "^3.15.0",
|
|
36
|
-
"c8": "^7.
|
|
36
|
+
"c8": "^7.10.0",
|
|
37
37
|
"documentation": "^13.2.5",
|
|
38
|
-
"repository-provider-test-support": "^1.
|
|
38
|
+
"repository-provider-test-support": "^1.8.1",
|
|
39
39
|
"semantic-release": "^18.0.0"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
|
-
"node": ">=14.
|
|
42
|
+
"node": ">=14.18.1"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
package/src/base-provider.mjs
CHANGED
|
@@ -93,6 +93,9 @@ export class BaseProvider {
|
|
|
93
93
|
default: 0
|
|
94
94
|
},
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Name of the provider
|
|
98
|
+
*/
|
|
96
99
|
name: {
|
|
97
100
|
type: "string"
|
|
98
101
|
},
|
|
@@ -101,6 +104,9 @@ export class BaseProvider {
|
|
|
101
104
|
type: "string"
|
|
102
105
|
},
|
|
103
106
|
|
|
107
|
+
/**
|
|
108
|
+
* to forward info/warn and error messages to
|
|
109
|
+
*/
|
|
104
110
|
messageDestination: {
|
|
105
111
|
type: "object",
|
|
106
112
|
default: console,
|
package/src/branch.mjs
CHANGED
|
@@ -63,7 +63,7 @@ export class Branch extends Ref {
|
|
|
63
63
|
/**
|
|
64
64
|
* Commit entries.
|
|
65
65
|
* @param {string} message commit message
|
|
66
|
-
* @param {
|
|
66
|
+
* @param {ContentEntry[]} updates content to be commited
|
|
67
67
|
* @param {Object} options
|
|
68
68
|
* @return {CommitResult}
|
|
69
69
|
*/
|
package/src/ref.mjs
CHANGED
|
@@ -56,13 +56,13 @@ export class Ref extends NamedObject {
|
|
|
56
56
|
/**
|
|
57
57
|
* List entries of the branch.
|
|
58
58
|
* @param {string[]} matchingPatterns
|
|
59
|
-
* @return {
|
|
59
|
+
* @return {ContentEntry} all matching entries in the branch
|
|
60
60
|
*/
|
|
61
61
|
async *entries(matchingPatterns) {}
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* List all entries of the branch.
|
|
65
|
-
* @return {asyncIterator<
|
|
65
|
+
* @return {asyncIterator<ContentEntry>} all entries in the branch
|
|
66
66
|
*/
|
|
67
67
|
async *[Symbol.asyncIterator]() {
|
|
68
68
|
return yield* this.entries();
|
|
@@ -71,7 +71,7 @@ export class Ref extends NamedObject {
|
|
|
71
71
|
/**
|
|
72
72
|
* Get exactly one matching entry by name or undefine if no such entry is found.
|
|
73
73
|
* @param {string} name
|
|
74
|
-
* @return {Promise<
|
|
74
|
+
* @return {Promise<ContentEntry>}
|
|
75
75
|
*/
|
|
76
76
|
async maybeEntry(name) {
|
|
77
77
|
return (await this.entries(name).next()).value;
|
|
@@ -80,7 +80,7 @@ export class Ref extends NamedObject {
|
|
|
80
80
|
/**
|
|
81
81
|
* Get exactly one matching entry by name (throws if entry is not found).
|
|
82
82
|
* @param {string} name
|
|
83
|
-
* @return {Promise<
|
|
83
|
+
* @return {Promise<ContentEntry>}
|
|
84
84
|
*/
|
|
85
85
|
async entry(name) {
|
|
86
86
|
const e = (await this.entries(name).next()).value;
|
|
@@ -202,4 +202,16 @@ export class Ref extends NamedObject {
|
|
|
202
202
|
!this.isProtected
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
|
+
|
|
206
|
+
info(...args) {
|
|
207
|
+
return this.repository.info(...args);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
warn(...args) {
|
|
211
|
+
return this.repository.warn(...args);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
error(...args) {
|
|
215
|
+
return this.repository.error(...args);
|
|
216
|
+
}
|
|
205
217
|
}
|