n8n-nodes-script-runner 1.13.0 → 1.14.0

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.
@@ -112,8 +112,8 @@ async function fetchLinkedIn(accountId, url, totalLimit, apiKey, minDelaySec, ma
112
112
  consecutiveEmptyPages = 0;
113
113
  }
114
114
  // Check if we've reached totalLimit
115
- if (collected.length >= totalLimit || (estimatedTotal !== null && collected.length >= estimatedTotal) || (page_count !== null && page_count < PAGE_SIZE)) {
116
- this.logger.info(`Reached totalLimit: ${collected.length}/${totalLimit}`);
115
+ if (collected.length >= totalLimit || (page_count !== null && page_count <= PAGE_SIZE)) {
116
+ this.logger.info(`Reached totalLimit: ${collected.length}/${totalLimit} Page:${pageCount}/${PAGE_SIZE} stopping.`);
117
117
  return {
118
118
  items: collected,
119
119
  nextCursor: apiNextCursor,
@@ -240,11 +240,12 @@ class LinkedInFetcher {
240
240
  try {
241
241
  const accountId = this.getNodeParameter('accountId', itemIndex);
242
242
  const url = this.getNodeParameter('url', itemIndex)?.trim();
243
- const total = this.getNodeParameter('total', itemIndex);
243
+ const totalLimit = this.getNodeParameter('total', itemIndex);
244
244
  const apiKey = this.getNodeParameter('apiKey', itemIndex);
245
245
  const startCursorRaw = this.getNodeParameter('startCursor', itemIndex, '');
246
246
  let startCursor = startCursorRaw ? startCursorRaw.trim() : null;
247
247
  const minDelay = this.getNodeParameter('minDelay', itemIndex);
248
+ let total = totalLimit - 1;
248
249
  const maxDelay = this.getNodeParameter('maxDelay', itemIndex);
249
250
  if (!url) {
250
251
  throw new Error('LinkedIn URL is required');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-script-runner",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Custom n8n nodes for script execution (jsdom, cheerio) and HTTP requests (axios, fetch)",
5
5
  "main": "index.js",
6
6
  "scripts": {