repository-provider 27.0.6 → 28.0.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 +2 -2
- package/src/base-provider.mjs +8 -8
- package/src/branch.mjs +1 -1
- package/src/commit.mjs +7 -0
- package/src/repository.mjs +8 -0
- package/src/tag.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"typescript": "^4.6.3"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=14.
|
|
44
|
+
"node": ">=16.14.2"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
package/src/base-provider.mjs
CHANGED
|
@@ -12,9 +12,9 @@ import { BaseObject } from "./base-object.mjs";
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {Object} MessageDestination
|
|
14
14
|
* Endpoint to deliver log messages to.
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
15
|
+
* @property {Function} info
|
|
16
|
+
* @property {Function} warn
|
|
17
|
+
* @property {Function} error
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -31,8 +31,8 @@ export class BaseProvider extends BaseObject {
|
|
|
31
31
|
/**
|
|
32
32
|
* Extract options suitable for the constructor
|
|
33
33
|
* form the given set of environment variables.
|
|
34
|
-
* @param {Object} env
|
|
35
|
-
* @param {string} instanceIdentifier
|
|
34
|
+
* @param {Object} env as of from process.env
|
|
35
|
+
* @param {string} instanceIdentifier part of variable name.
|
|
36
36
|
* @return {Object} undefined if no suitable environment variables have been found
|
|
37
37
|
*/
|
|
38
38
|
static optionsFromEnvironment(
|
|
@@ -89,7 +89,7 @@ export class BaseProvider extends BaseObject {
|
|
|
89
89
|
return {
|
|
90
90
|
...super.attributes,
|
|
91
91
|
/**
|
|
92
|
-
* In case there are several
|
|
92
|
+
* In case there are several providers able to support a given source which one sould be used ?
|
|
93
93
|
* this defines the order
|
|
94
94
|
*/
|
|
95
95
|
priority: {
|
|
@@ -98,7 +98,7 @@ export class BaseProvider extends BaseObject {
|
|
|
98
98
|
},
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Name of the provider
|
|
101
|
+
* Name of the provider.
|
|
102
102
|
*/
|
|
103
103
|
name: {
|
|
104
104
|
type: "string",
|
|
@@ -111,7 +111,7 @@ export class BaseProvider extends BaseObject {
|
|
|
111
111
|
},
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* To forward info/warn and error messages to
|
|
115
115
|
*/
|
|
116
116
|
messageDestination: {
|
|
117
117
|
type: "object",
|
package/src/branch.mjs
CHANGED
package/src/commit.mjs
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
* @property {string} ref
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export class User
|
|
9
|
+
{
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* @property {Repository} repository
|
|
10
15
|
* @property {string} message
|
|
11
16
|
* @property {string} sha
|
|
17
|
+
* @property {User} author
|
|
18
|
+
* @property {User} committer
|
|
12
19
|
*/
|
|
13
20
|
export class Commit {
|
|
14
21
|
constructor(repository) {
|
package/src/repository.mjs
CHANGED
|
@@ -149,6 +149,14 @@ export class Repository extends NamedObject {
|
|
|
149
149
|
return (await this.defaultBranch).maybeEntry(name);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* List commits of the default branch.
|
|
154
|
+
* @param {Object} options
|
|
155
|
+
* @return {AsyncIterator<Commit>} all matching commits in the repository
|
|
156
|
+
*/
|
|
157
|
+
async *commits(options) {
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
/**
|
|
153
161
|
* Urls to access the repo.
|
|
154
162
|
* @return {string[]}
|