n8n-nodes-script-runner 1.12.0 → 1.13.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,7 +112,7 @@ 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) {
115
+ if (collected.length >= totalLimit || (estimatedTotal !== null && collected.length >= estimatedTotal) || (page_count !== null && page_count < PAGE_SIZE)) {
116
116
  this.logger.info(`Reached totalLimit: ${collected.length}/${totalLimit}`);
117
117
  return {
118
118
  items: collected,
@@ -124,7 +124,7 @@ async function fetchLinkedIn(accountId, url, totalLimit, apiKey, minDelaySec, ma
124
124
  };
125
125
  }
126
126
  // Continue only if needed
127
- if (collected.length < totalLimit && page_count !== null && page_count >= PAGE_SIZE) {
127
+ if (collected.length < totalLimit) {
128
128
  const delayMs = randomDelayMs(minDelaySec, maxDelaySec);
129
129
  this.logger.info(`Added ${addedThisPage} new items → total ${collected.length}/${totalLimit}. ` +
130
130
  `Waiting ~${Math.round(delayMs / 1000)} seconds...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-script-runner",
3
- "version": "1.12.0",
3
+ "version": "1.13.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": {