litestar-vite-plugin 0.6.7 → 0.6.8

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.
@@ -1,7 +1,5 @@
1
1
  export declare function resolvePageComponent<T>(path: string | string[], pages: Record<string, Promise<T> | (() => Promise<T>)>): Promise<T>;
2
- export declare function route(routeName: string, options?: {
3
- relativeUrl?: boolean;
4
- }, ...args: any[]): string;
2
+ export declare function route(routeName: string, ...args: any[]): string;
5
3
  export declare function getRelativeUrlPath(url: string): string;
6
4
  export declare function toRoute(url: string): string | null;
7
5
  export declare function currentRoute(): string | null;
@@ -9,7 +9,7 @@ export async function resolvePageComponent(path, pages) {
9
9
  }
10
10
  throw new Error(`Page not found: ${path}`);
11
11
  }
12
- export function route(routeName, options = {}, ...args) {
12
+ export function route(routeName, ...args) {
13
13
  let url = globalThis.routes[routeName];
14
14
  if (!url) {
15
15
  console.error(`URL '${routeName}' not found in routes.`);
@@ -51,9 +51,6 @@ export function route(routeName, options = {}, ...args) {
51
51
  console.error(error.message);
52
52
  return "#";
53
53
  }
54
- if (options.relativeUrl) {
55
- return url;
56
- }
57
54
  const fullUrl = new URL(url, window.location.origin);
58
55
  return fullUrl.href;
59
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "litestar-vite-plugin",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "type": "module",
5
5
  "description": "Litestar plugin for Vite.",
6
6
  "keywords": [