@netlify/plugin-nextjs 5.14.5 → 5.14.7
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.
|
@@ -385,16 +385,22 @@ var Store = class _Store {
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
async deleteAll() {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
388
|
+
let totalDeletedBlobs = 0;
|
|
389
|
+
let hasMore = true;
|
|
390
|
+
while (hasMore) {
|
|
391
|
+
const res = await this.client.makeRequest({ method: "delete", storeName: this.name });
|
|
392
|
+
if (res.status !== 200) {
|
|
393
|
+
throw new BlobsInternalError(res);
|
|
394
|
+
}
|
|
395
|
+
const data = await res.json();
|
|
396
|
+
if (typeof data.blobs_deleted !== "number") {
|
|
397
|
+
throw new BlobsInternalError(res);
|
|
398
|
+
}
|
|
399
|
+
totalDeletedBlobs += data.blobs_deleted;
|
|
400
|
+
hasMore = typeof data.has_more === "boolean" && data.has_more;
|
|
395
401
|
}
|
|
396
402
|
return {
|
|
397
|
-
deletedBlobs:
|
|
403
|
+
deletedBlobs: totalDeletedBlobs
|
|
398
404
|
};
|
|
399
405
|
}
|
|
400
406
|
async get(key, options) {
|