@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
- const res = await this.client.makeRequest({ method: "delete", storeName: this.name });
389
- if (res.status !== 200) {
390
- throw new BlobsInternalError(res);
391
- }
392
- const data = await res.json();
393
- if (typeof data.blobs_deleted !== "number") {
394
- throw new BlobsInternalError(res);
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: data.blobs_deleted
403
+ deletedBlobs: totalDeletedBlobs
398
404
  };
399
405
  }
400
406
  async get(key, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "5.14.5",
3
+ "version": "5.14.7",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",