@opennextjs/aws 3.9.1 → 3.9.2

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.
@@ -16,10 +16,19 @@ export function isExternal(url, host) {
16
16
  if (!url)
17
17
  return false;
18
18
  const pattern = /^https?:\/\//;
19
+ if (!pattern.test(url))
20
+ return false;
19
21
  if (host) {
20
- return pattern.test(url) && !url.includes(host);
22
+ try {
23
+ const parsedUrl = new URL(url);
24
+ return parsedUrl.host !== host;
25
+ }
26
+ catch {
27
+ // If URL parsing fails, fall back to substring check
28
+ return !url.includes(host);
29
+ }
21
30
  }
22
- return pattern.test(url);
31
+ return true;
23
32
  }
24
33
  export function convertFromQueryString(query) {
25
34
  if (query === "")
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "access": "public"
4
4
  },
5
5
  "name": "@opennextjs/aws",
6
- "version": "3.9.1",
6
+ "version": "3.9.2",
7
7
  "bin": {
8
8
  "open-next": "./dist/index.js"
9
9
  },
@@ -59,6 +59,9 @@
59
59
  "tsc-alias": "^1.8.16",
60
60
  "typescript": "5.9.3"
61
61
  },
62
+ "peerDependencies": {
63
+ "next": "<15 || ~15.4.8 || ~15.5.7 || ^16.0.7"
64
+ },
62
65
  "bugs": {
63
66
  "url": "https://github.com/opennextjs/opennextjs-aws/issues"
64
67
  },