github-repository-provider 9.0.10 → 9.0.11
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 +25 -15
- package/package.json +7 -7
- package/src/github-branch.mjs +6 -1
- package/types/github-branch.d.mts +8 -36
- package/types/github-provider.d.mts +2 -2
package/README.md
CHANGED
|
@@ -42,13 +42,15 @@ console.log(entry.name);
|
|
|
42
42
|
* [Parameters](#parameters-2)
|
|
43
43
|
* [entry](#entry)
|
|
44
44
|
* [Parameters](#parameters-3)
|
|
45
|
-
* [
|
|
45
|
+
* [entries](#entries)
|
|
46
46
|
* [Parameters](#parameters-4)
|
|
47
|
+
* [removeEntries](#removeentries)
|
|
48
|
+
* [Parameters](#parameters-5)
|
|
47
49
|
* [GithubOwner](#githubowner)
|
|
48
50
|
* [createRepository](#createrepository)
|
|
49
|
-
* [Parameters](#parameters-5)
|
|
50
|
-
* [deleteRepository](#deleterepository)
|
|
51
51
|
* [Parameters](#parameters-6)
|
|
52
|
+
* [deleteRepository](#deleterepository)
|
|
53
|
+
* [Parameters](#parameters-7)
|
|
52
54
|
* [attributeMapping](#attributemapping)
|
|
53
55
|
* [GithubProvider](#githubprovider)
|
|
54
56
|
* [Examples](#examples)
|
|
@@ -58,23 +60,23 @@ console.log(entry.name);
|
|
|
58
60
|
* [instanceIdentifier](#instanceidentifier)
|
|
59
61
|
* [GithubPullRequest](#githubpullrequest)
|
|
60
62
|
* [\_merge](#_merge)
|
|
61
|
-
* [Parameters](#parameters-
|
|
63
|
+
* [Parameters](#parameters-8)
|
|
62
64
|
* [update](#update)
|
|
63
65
|
* [validMergeMethods](#validmergemethods)
|
|
64
66
|
* [list](#list)
|
|
65
|
-
* [Parameters](#parameters-8)
|
|
66
|
-
* [open](#open)
|
|
67
67
|
* [Parameters](#parameters-9)
|
|
68
|
+
* [open](#open)
|
|
69
|
+
* [Parameters](#parameters-10)
|
|
68
70
|
* [GithubRepository](#githubrepository)
|
|
69
71
|
* [defaultBranchName](#defaultbranchname)
|
|
70
72
|
* [commits](#commits)
|
|
71
|
-
* [Parameters](#parameters-10)
|
|
72
|
-
* [commitForSha](#commitforsha)
|
|
73
73
|
* [Parameters](#parameters-11)
|
|
74
|
-
* [
|
|
74
|
+
* [commitForSha](#commitforsha)
|
|
75
75
|
* [Parameters](#parameters-12)
|
|
76
|
-
* [
|
|
76
|
+
* [tree](#tree)
|
|
77
77
|
* [Parameters](#parameters-13)
|
|
78
|
+
* [addTree](#addtree)
|
|
79
|
+
* [Parameters](#parameters-14)
|
|
78
80
|
* [initializeBranches](#initializebranches)
|
|
79
81
|
* [initializeTags](#initializetags)
|
|
80
82
|
* [url](#url)
|
|
@@ -83,13 +85,13 @@ console.log(entry.name);
|
|
|
83
85
|
* [api](#api)
|
|
84
86
|
* [update](#update-1)
|
|
85
87
|
* [refId](#refid)
|
|
86
|
-
* [Parameters](#parameters-14)
|
|
87
|
-
* [\_setRefId](#_setrefid)
|
|
88
88
|
* [Parameters](#parameters-15)
|
|
89
|
-
* [
|
|
89
|
+
* [\_setRefId](#_setrefid)
|
|
90
90
|
* [Parameters](#parameters-16)
|
|
91
|
-
* [
|
|
91
|
+
* [setRefId](#setrefid)
|
|
92
92
|
* [Parameters](#parameters-17)
|
|
93
|
+
* [deletePullRequest](#deletepullrequest)
|
|
94
|
+
* [Parameters](#parameters-18)
|
|
93
95
|
* [initializeHooks](#initializehooks)
|
|
94
96
|
|
|
95
97
|
## GithubBranch
|
|
@@ -135,13 +137,21 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
135
137
|
|
|
136
138
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
137
139
|
|
|
140
|
+
### entries
|
|
141
|
+
|
|
142
|
+
#### Parameters
|
|
143
|
+
|
|
144
|
+
* `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))** 
|
|
145
|
+
|
|
146
|
+
Returns **AsyncGenerator\<ContentEntry>** all matching entries in the branch
|
|
147
|
+
|
|
138
148
|
### removeEntries
|
|
139
149
|
|
|
140
150
|
<https://developer.github.com/v3/repos/contents/>
|
|
141
151
|
|
|
142
152
|
#### Parameters
|
|
143
153
|
|
|
144
|
-
* `entries` **
|
|
154
|
+
* `entries` **AsyncIterable\<ContentEntry>** 
|
|
145
155
|
|
|
146
156
|
## GithubOwner
|
|
147
157
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -37,25 +37,25 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"content-entry": "^11.0.0",
|
|
39
39
|
"fetch-link-util": "^1.1.1",
|
|
40
|
-
"fetch-rate-limit-util": "^4.
|
|
40
|
+
"fetch-rate-limit-util": "^4.3.1",
|
|
41
41
|
"matching-iterator": "^2.1.3",
|
|
42
42
|
"one-time-execution-method": "^3.1.1",
|
|
43
43
|
"repository-provider": "^35.2.15"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/node": "^20.11
|
|
47
|
-
"ava": "^6.1.
|
|
46
|
+
"@types/node": "^20.12.11",
|
|
47
|
+
"ava": "^6.1.3",
|
|
48
48
|
"c8": "^9.1.0",
|
|
49
49
|
"documentation": "^14.0.3",
|
|
50
50
|
"etag-cache-leveldb": "^2.1.1",
|
|
51
51
|
"leveldown": "^6.1.1",
|
|
52
52
|
"levelup": "^5.1.1",
|
|
53
53
|
"repository-provider-test-support": "^3.1.4",
|
|
54
|
-
"semantic-release": "^23.
|
|
55
|
-
"typescript": "^5.4.
|
|
54
|
+
"semantic-release": "^23.1.1",
|
|
55
|
+
"typescript": "^5.4.5"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
|
-
"node": ">=20.
|
|
58
|
+
"node": ">=20.12.2"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
package/src/github-branch.mjs
CHANGED
|
@@ -102,6 +102,11 @@ export class GithubBranch extends Branch {
|
|
|
102
102
|
return p;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @param {string[]|string} patterns
|
|
108
|
+
* @return {AsyncGenerator<ContentEntry>} all matching entries in the branch
|
|
109
|
+
*/
|
|
105
110
|
async *entries(patterns) {
|
|
106
111
|
const commit = await this.owner.commitForSha(await this.refId);
|
|
107
112
|
|
|
@@ -139,7 +144,7 @@ export class GithubBranch extends Branch {
|
|
|
139
144
|
|
|
140
145
|
/**
|
|
141
146
|
* https://developer.github.com/v3/repos/contents/
|
|
142
|
-
* @param {
|
|
147
|
+
* @param {AsyncIterable<ContentEntry>} entries
|
|
143
148
|
*/
|
|
144
149
|
async removeEntries(entries) {
|
|
145
150
|
for await (const entry of entries) {
|
|
@@ -24,46 +24,18 @@ export class GithubBranch extends Branch {
|
|
|
24
24
|
* @param {string} name
|
|
25
25
|
*/
|
|
26
26
|
entry(name: string): Promise<any>;
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param {string[]|string} patterns
|
|
30
|
+
* @return {AsyncGenerator<ContentEntry>} all matching entries in the branch
|
|
31
|
+
*/
|
|
32
|
+
entries(patterns: string[] | string): AsyncGenerator<ContentEntry>;
|
|
28
33
|
/**
|
|
29
34
|
* https://developer.github.com/v3/repos/contents/
|
|
30
|
-
* @param {
|
|
35
|
+
* @param {AsyncIterable<ContentEntry>} entries
|
|
31
36
|
*/
|
|
32
|
-
removeEntries(entries:
|
|
37
|
+
removeEntries(entries: AsyncIterable<ContentEntry>): Promise<void>;
|
|
33
38
|
#private;
|
|
34
39
|
}
|
|
35
40
|
import { Branch } from "repository-provider";
|
|
36
41
|
import { ContentEntry } from "content-entry";
|
|
37
|
-
import { CollectionEntry } from "content-entry";
|
|
38
|
-
declare const LazyBufferContentEntry_base: new (name: string) => {
|
|
39
|
-
readonly string: string;
|
|
40
|
-
readonly readStream: ReadableStream<any>;
|
|
41
|
-
readonly isEmpty: boolean;
|
|
42
|
-
readonly size: number;
|
|
43
|
-
getReadStream(): Promise<ReadableStream<any>>;
|
|
44
|
-
readonly isBlob: boolean;
|
|
45
|
-
readonly types: string[];
|
|
46
|
-
readonly buffer: Uint8Array;
|
|
47
|
-
readonly encoding: string;
|
|
48
|
-
equalsContent(other: ContentEntry): Promise<boolean>;
|
|
49
|
-
name: string;
|
|
50
|
-
readonly isCollection: boolean;
|
|
51
|
-
readonly mode: number;
|
|
52
|
-
readonly mtime: Date;
|
|
53
|
-
readonly isDeleted: boolean;
|
|
54
|
-
readonly isExistent: boolean;
|
|
55
|
-
toJSON(): {
|
|
56
|
-
name: string;
|
|
57
|
-
isBlob: boolean;
|
|
58
|
-
isCollection: boolean;
|
|
59
|
-
};
|
|
60
|
-
equals(other: import("content-entry").BaseEntry): Promise<boolean>;
|
|
61
|
-
};
|
|
62
|
-
declare class LazyBufferContentEntry extends LazyBufferContentEntry_base {
|
|
63
|
-
constructor(name: any, mode: any, branch: any);
|
|
64
|
-
branch: any;
|
|
65
|
-
get buffer(): Promise<any>;
|
|
66
|
-
getBuffer(): Promise<any>;
|
|
67
|
-
#private;
|
|
68
|
-
}
|
|
69
|
-
export {};
|
|
@@ -152,8 +152,8 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
152
152
|
env?: string | string[];
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
-
fetch(url: any, options?: {}):
|
|
156
|
-
fetchJSON(url: any, options?: {}):
|
|
155
|
+
fetch(url: any, options?: {}): Promise<Response>;
|
|
156
|
+
fetchJSON(url: any, options?: {}): Promise<Response>;
|
|
157
157
|
/**
|
|
158
158
|
* {@link https://developer.github.com/v3/repos/#list-repositories-for-the-authenticated-user}
|
|
159
159
|
*/
|