github-repository-provider 7.26.1 → 7.26.2
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 +1 -1
- package/src/github-branch.mjs +11 -5
package/package.json
CHANGED
package/src/github-branch.mjs
CHANGED
|
@@ -113,7 +113,7 @@ export class GithubBranch extends Branch {
|
|
|
113
113
|
const { json } = await this.provider.fetchJSON(
|
|
114
114
|
`repos/${this.slug}/contents/${name}?ref=${this.ref}`
|
|
115
115
|
);
|
|
116
|
-
|
|
116
|
+
|
|
117
117
|
const entry = new this.entryClass(
|
|
118
118
|
name,
|
|
119
119
|
Buffer.from(json.content, "base64")
|
|
@@ -240,11 +240,17 @@ class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
const branch = this.branch;
|
|
243
|
-
const { json } = await branch.provider.fetchJSON(
|
|
244
|
-
`repos/${branch.slug}/contents/${this.name}?ref=${branch.ref}`
|
|
245
|
-
);
|
|
246
243
|
|
|
247
|
-
|
|
244
|
+
const f = async () => {
|
|
245
|
+
const { json } = await branch.provider.fetchJSON(
|
|
246
|
+
`repos/${branch.slug}/contents/${this.name}?ref=${branch.ref}`
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
this._buffer = Buffer.from(json.content, "base64");
|
|
250
|
+
return this._buffer;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
this._buffer = f();
|
|
248
254
|
return this._buffer;
|
|
249
255
|
}
|
|
250
256
|
}
|