github-repository-provider 7.25.16 → 7.25.20
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 +1 -1
- package/package.json +3 -3
- package/src/github-branch.mjs +7 -6
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ Writes content into the branch
|
|
|
97
97
|
|
|
98
98
|
* `entry` **ConentEntry**
|
|
99
99
|
|
|
100
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
|
|
100
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ContentEntry>** written content with sha values set
|
|
101
101
|
|
|
102
102
|
### commit
|
|
103
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.25.
|
|
3
|
+
"version": "7.25.20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"matching-iterator": "^2.0.0",
|
|
37
37
|
"node-fetch": "3.2.0",
|
|
38
38
|
"one-time-execution-method": "^2.0.9",
|
|
39
|
-
"repository-provider": "^26.1
|
|
39
|
+
"repository-provider": "^26.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"ava": "^4.0.1",
|
|
43
43
|
"c8": "^7.11.0",
|
|
44
44
|
"documentation": "^13.2.5",
|
|
45
|
-
"repository-provider-test-support": "^1.9.
|
|
45
|
+
"repository-provider-test-support": "^1.9.9",
|
|
46
46
|
"semantic-release": "^19.0.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
package/src/github-branch.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export class GithubBranch extends Branch {
|
|
|
15
15
|
* Writes content into the branch
|
|
16
16
|
* {@link https://developer.github.com/v3/git/blobs/#get-a-blob}
|
|
17
17
|
* @param {ConentEntry} entry
|
|
18
|
-
* @return {Promise<
|
|
18
|
+
* @return {Promise<ContentEntry>} written content with sha values set
|
|
19
19
|
*/
|
|
20
20
|
async writeEntry(entry) {
|
|
21
21
|
const { json } = await this.provider.fetchJSON(
|
|
@@ -137,12 +137,12 @@ export class GithubBranch extends Branch {
|
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* @see https://developer.github.com/v3/git/trees/
|
|
140
|
-
* @param {string
|
|
140
|
+
* @param {string} sha
|
|
141
141
|
* @return {Object[]}
|
|
142
142
|
*/
|
|
143
|
-
async tree(
|
|
143
|
+
async tree(sha) {
|
|
144
144
|
const { json } = await this.provider.fetchJSON(
|
|
145
|
-
`repos/${this.slug}/git/trees/${
|
|
145
|
+
`repos/${this.slug}/git/trees/${sha}?recursive=1`
|
|
146
146
|
);
|
|
147
147
|
return json.tree;
|
|
148
148
|
}
|
|
@@ -155,7 +155,7 @@ export class GithubBranch extends Branch {
|
|
|
155
155
|
})) {
|
|
156
156
|
yield entry.type === "tree"
|
|
157
157
|
? new BaseCollectionEntry(entry.path)
|
|
158
|
-
: new LazyBufferContentEntry(entry.path, this);
|
|
158
|
+
: new LazyBufferContentEntry(entry.path, entry.mode, this);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -178,8 +178,9 @@ export class GithubBranch extends Branch {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
|
|
181
|
-
constructor(name, branch) {
|
|
181
|
+
constructor(name, mode, branch) {
|
|
182
182
|
super(name);
|
|
183
|
+
Object.defineProperty(this,'mode',{ value: mode});
|
|
183
184
|
this.branch = branch;
|
|
184
185
|
}
|
|
185
186
|
|