linkedin-secret-sauce 0.3.26 → 0.3.27

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.
@@ -289,9 +289,9 @@ async function searchSalesLeads(keywords, options) {
289
289
  // Extract metadata.totalDisplayCount (LinkedIn's display string like "500K+")
290
290
  const metadataVal = rrec && 'metadata' in rrec ? rrec.metadata : undefined;
291
291
  const metadata = (metadataVal && typeof metadataVal === 'object') ? metadataVal : undefined;
292
- // Calculate hasMore: if we got a full page of results, there may be more
293
- // This is more reliable than relying on total, which is often undefined
294
- const hasMore = items.length === count;
292
+ // Calculate hasMore using LinkedIn's total count (primary) or result length (fallback)
293
+ // LinkedIn API always returns paging.total, so we use it for accurate pagination
294
+ const hasMore = paging?.total ? (start + count) < paging.total : items.length === count;
295
295
  const result = options
296
296
  ? {
297
297
  items,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedin-secret-sauce",
3
- "version": "0.3.26",
3
+ "version": "0.3.27",
4
4
  "description": "Private LinkedIn Sales Navigator client with automatic cookie management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,20 +10,6 @@
10
10
  "publishConfig": {
11
11
  "registry": "https://registry.npmjs.org/"
12
12
  },
13
- "scripts": {
14
- "dev:playground": "pnpm -C apps/playground dev",
15
- "search": "node scripts/rg-fast.mjs",
16
- "rg:fast": "node scripts/rg-fast.mjs",
17
- "build": "tsc -p tsconfig.json",
18
- "lint": "eslint \"src/**/*.ts\" --max-warnings=0",
19
- "lint:fix": "eslint \"src/**/*.ts\" --fix",
20
- "dev": "tsc -w -p tsconfig.json",
21
- "test": "vitest run",
22
- "prepublishOnly": "npm run build",
23
- "release:patch": "npm version patch && git push --follow-tags",
24
- "release:minor": "npm version minor && git push --follow-tags",
25
- "release:major": "npm version major && git push --follow-tags"
26
- },
27
13
  "keywords": [
28
14
  "linkedin",
29
15
  "sales-navigator",
@@ -53,5 +39,18 @@
53
39
  "husky": "^9.0.11",
54
40
  "typescript": "^5.9.3",
55
41
  "vitest": "^1.6.0"
42
+ },
43
+ "scripts": {
44
+ "dev:playground": "pnpm -C apps/playground dev",
45
+ "search": "node scripts/rg-fast.mjs",
46
+ "rg:fast": "node scripts/rg-fast.mjs",
47
+ "build": "tsc -p tsconfig.json",
48
+ "lint": "eslint \"src/**/*.ts\" --max-warnings=0",
49
+ "lint:fix": "eslint \"src/**/*.ts\" --fix",
50
+ "dev": "tsc -w -p tsconfig.json",
51
+ "test": "vitest run",
52
+ "release:patch": "npm version patch && git push --follow-tags",
53
+ "release:minor": "npm version minor && git push --follow-tags",
54
+ "release:major": "npm version major && git push --follow-tags"
56
55
  }
57
- }
56
+ }