netlify-cli 27.16.1 → 27.16.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.
@@ -57,6 +57,7 @@ export const debugFetch = async (url, init) => {
57
57
  };
58
58
  export const fetchHistoricalLogs = async ({ baseUrl, accessToken, from, to, deployId, }) => {
59
59
  const entries = [];
60
+ const requestedCursors = new Set();
60
61
  let cursor;
61
62
  do {
62
63
  const parsedUrl = new URL(baseUrl);
@@ -79,7 +80,13 @@ export const fetchHistoricalLogs = async ({ baseUrl, accessToken, from, to, depl
79
80
  }
80
81
  const body = (await response.json());
81
82
  entries.push(...(body.logs ?? []));
82
- cursor = body.pagination?.next;
83
+ cursor = body.next;
84
+ if (cursor) {
85
+ if (requestedCursors.has(cursor)) {
86
+ throw new Error(`Failed to fetch logs: pagination repeated cursor ${cursor}`);
87
+ }
88
+ requestedCursors.add(cursor);
89
+ }
83
90
  } while (cursor);
84
91
  return entries;
85
92
  };
@@ -258,7 +258,9 @@ const runHistoricalMode = async ({ sources, client, siteId, accessToken, deployI
258
258
  to,
259
259
  deployId,
260
260
  });
261
- allEntries.push(...entries);
261
+ for (const entry of entries) {
262
+ allEntries.push(entry);
263
+ }
262
264
  }
263
265
  }
264
266
  if (sources.includes('edge-functions')) {
@@ -270,7 +272,9 @@ const runHistoricalMode = async ({ sources, client, siteId, accessToken, deployI
270
272
  deployId,
271
273
  filterNames: edgeFunctionNames,
272
274
  });
273
- allEntries.push(...entries);
275
+ for (const entry of entries) {
276
+ allEntries.push(entry);
277
+ }
274
278
  }
275
279
  let serverLogsTruncated = false;
276
280
  if (sources.includes('server')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
- "version": "27.16.1",
3
+ "version": "27.16.2",
4
4
  "description": "Netlify command line tool",
5
5
  "keywords": [
6
6
  "api",