lwazi 1.2.5 → 1.2.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lwazi",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Lwazi is an AI assistant for Laravel. Install with one command to add an AI assistant to your Laravel app.",
5
5
  "main": "bin/lwazi.js",
6
6
  "bin": {
@@ -342,9 +342,16 @@ class NavigationCrawler
342
342
  $parts = parse_url($full);
343
343
  $scheme = $parts['scheme'] ?? 'http';
344
344
  $host = $parts['host'] ?? parse_url($this->rootUrl, PHP_URL_HOST);
345
+ $port = $parts['port'] ?? parse_url($this->rootUrl, PHP_URL_PORT);
345
346
  $path = $parts['path'] ?? '/';
346
347
 
347
- return $scheme . '://' . $host . $path;
348
+ $url = $scheme . '://' . $host;
349
+ if ($port && (($scheme === 'http' && $port !== 80) || ($scheme === 'https' && $port !== 443))) {
350
+ $url .= ':' . $port;
351
+ }
352
+ $url .= $path;
353
+
354
+ return $url;
348
355
  }
349
356
 
350
357
  protected function isInternal(string $url): bool