github-repository-provider 7.26.37 → 7.26.38
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 +8 -6
package/package.json
CHANGED
package/src/github-branch.mjs
CHANGED
|
@@ -234,9 +234,11 @@ class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
|
|
|
234
234
|
return this.getBuffer();
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
#buffer;
|
|
238
|
+
|
|
237
239
|
async getBuffer() {
|
|
238
|
-
if (this
|
|
239
|
-
return this
|
|
240
|
+
if (this.#buffer) {
|
|
241
|
+
return this.#buffer;
|
|
240
242
|
}
|
|
241
243
|
|
|
242
244
|
const branch = this.branch;
|
|
@@ -246,11 +248,11 @@ class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
|
|
|
246
248
|
`repos/${branch.slug}/contents/${this.name}?ref=${branch.ref}`
|
|
247
249
|
);
|
|
248
250
|
|
|
249
|
-
this
|
|
250
|
-
return this
|
|
251
|
+
this.#buffer = Buffer.from(json.content, "base64");
|
|
252
|
+
return this.#buffer;
|
|
251
253
|
};
|
|
252
254
|
|
|
253
|
-
this
|
|
254
|
-
return this
|
|
255
|
+
this.#buffer = f();
|
|
256
|
+
return this.#buffer;
|
|
255
257
|
}
|
|
256
258
|
}
|