pruny 1.43.3 → 1.43.4

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12592,7 +12592,7 @@ var API_METHOD_PATTERNS = [
12592
12592
  { regex: /fetch\s*\(\s*`([^`]*?\/[^`]*)`/g, method: undefined, source: "http-client" },
12593
12593
  { regex: /['"`](\/api\/[^'"`\s]+)['"`]/g, method: undefined, source: "http-client" },
12594
12594
  { regex: /`([^`\n]*?\/api\/[^`\n]*)`/g, method: undefined, source: "http-client" },
12595
- { regex: /`[^`]*?(\/api\/[\w-]+(?:\/[\w-]+)*(?:\/\$\{[^}]+\})*)[^`]*?`/gs, method: undefined, source: "http-client" },
12595
+ { regex: /`[^`]{0,500}?(\/api\/[\w-]+(?:\/[\w-]+)*(?:\/\$\{[^}]+\})*)[^`]{0,500}?`/gs, method: undefined, source: "http-client" },
12596
12596
  { regex: /`[^`\n]*(?:API_URL|BASE_URL|BACKEND_URL|SERVER_URL)\}(\/[^`\n]*)`/g, method: undefined, source: "http-client" },
12597
12597
  { regex: /`([^`\n]*?(\/[\w-]{2,}\/[^`\n]*))`/g, method: undefined, source: "generic" },
12598
12598
  { regex: /https?:\/\/[^/]+(\/[^'"`\s]*)/g, method: undefined, source: "http-client" },
@@ -12632,7 +12632,7 @@ function extractApiReferences(content) {
12632
12632
  const acceptedMatches = [];
12633
12633
  for (const match of matches) {
12634
12634
  const isRedundant = acceptedMatches.some((accepted) => {
12635
- return accepted.start <= match.start && accepted.end >= match.end;
12635
+ return accepted.path === match.path && accepted.start <= match.start && accepted.end >= match.end;
12636
12636
  });
12637
12637
  if (!isRedundant) {
12638
12638
  acceptedMatches.push(match);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pruny",
3
- "version": "1.43.3",
3
+ "version": "1.43.4",
4
4
  "description": "Find and remove unused Next.js API routes & Nest.js Controllers",
5
5
  "type": "module",
6
6
  "files": [