pruny 1.0.12 → 1.0.13
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.
- package/package.json +1 -1
- package/src/patterns.ts +4 -0
package/package.json
CHANGED
package/src/patterns.ts
CHANGED
|
@@ -19,6 +19,9 @@ export const API_PATTERNS: RegExp[] = [
|
|
|
19
19
|
|
|
20
20
|
// Generic string containing /api/
|
|
21
21
|
/['"`]\/api\/([^'"`\s]+)['"`]/g,
|
|
22
|
+
|
|
23
|
+
// Full URL matching (http://.../api/...)
|
|
24
|
+
/['"`](?:https?:\/\/[^\/]+)?\/api\/([^'"`\s]+)['"`]/g,
|
|
22
25
|
];
|
|
23
26
|
|
|
24
27
|
/**
|
|
@@ -47,6 +50,7 @@ export const API_METHOD_PATTERNS: { regex: RegExp; method?: string }[] = [
|
|
|
47
50
|
{ regex: /fetch\s*\(\s*['"`]\/api\/([^'"`\s)]+)['"`]/g, method: undefined },
|
|
48
51
|
{ regex: /fetch\s*\(\s*`\/api\/([^`\s)]+)`/g, method: undefined },
|
|
49
52
|
{ regex: /['"`]\/api\/([^'"`\s]+)['"`]/g, method: undefined },
|
|
53
|
+
{ regex: /['"`](?:https?:\/\/[^\/]+)?\/api\/([^'"`\s]+)['"`]/g, method: undefined },
|
|
50
54
|
];
|
|
51
55
|
|
|
52
56
|
/**
|