@ngn-net/nestjs-telescope 0.3.14 → 0.3.15

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.
@@ -896,7 +896,15 @@
896
896
  const [totalEntries, setTotalEntries] = useState(0);
897
897
  const [perPage, setPerPage] = useState(50);
898
898
 
899
- const prefixPath = window.location.pathname.split('/api')[0].split('/')[1] || 'telescope';
899
+ const prefixPath = (() => {
900
+ const path = window.location.pathname;
901
+ // Detect the telescope base path from the URL
902
+ // e.g. /telescope → 'telescope', /api/telescope → 'api/telescope'
903
+ const segments = path.split('/').filter(Boolean);
904
+ const telescopeIdx = segments.findIndex(s => s === 'telescope');
905
+ if (telescopeIdx === -1) return 'telescope';
906
+ return segments.slice(0, telescopeIdx + 1).join('/');
907
+ })();
900
908
 
901
909
  // Load entries when dependencies change
902
910
  useEffect(() => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ngn-net/nestjs-telescope",
3
- "version": "0.3.14",
4
- "builtAt": "2026-06-13T11:29:51.036Z"
3
+ "version": "0.3.15",
4
+ "builtAt": "2026-06-13T13:33:09.249Z"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngn-net/nestjs-telescope",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/ui/index.html CHANGED
@@ -896,7 +896,15 @@
896
896
  const [totalEntries, setTotalEntries] = useState(0);
897
897
  const [perPage, setPerPage] = useState(50);
898
898
 
899
- const prefixPath = window.location.pathname.split('/api')[0].split('/')[1] || 'telescope';
899
+ const prefixPath = (() => {
900
+ const path = window.location.pathname;
901
+ // Detect the telescope base path from the URL
902
+ // e.g. /telescope → 'telescope', /api/telescope → 'api/telescope'
903
+ const segments = path.split('/').filter(Boolean);
904
+ const telescopeIdx = segments.findIndex(s => s === 'telescope');
905
+ if (telescopeIdx === -1) return 'telescope';
906
+ return segments.slice(0, telescopeIdx + 1).join('/');
907
+ })();
900
908
 
901
909
  // Load entries when dependencies change
902
910
  useEffect(() => {