@h3ravel/shared 0.10.0 → 0.11.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @h3ravel/shared
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - remove 'name' from RouterEnd and only join in apiResource.
8
+
3
9
  ## 0.10.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.cts CHANGED
@@ -189,7 +189,7 @@ interface IResponse {
189
189
  getEvent<K extends DotNestedKeys<H3Event>>(key: K): DotNestedValue<H3Event, K>;
190
190
  }
191
191
 
192
- type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'apiResource' | 'name' | 'group' | 'route';
192
+ type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'apiResource' | 'group' | 'route';
193
193
  /**
194
194
  * Interface for the Router contract, defining methods for HTTP routing.
195
195
  */
@@ -232,7 +232,7 @@ interface IRouter {
232
232
  * @param controller - The controller class handling the resource.
233
233
  * @param middleware - Optional middleware array.
234
234
  */
235
- apiResource(path: string, controller: new (app: IApplication) => IController, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
235
+ apiResource(path: string, controller: new (app: IApplication) => IController, middleware?: IMiddleware[]): Omit<this, RouterEnd | 'name'>;
236
236
  /**
237
237
  * Generates a URL for a named route.
238
238
  * @param name - The name of the route.
package/dist/index.d.ts CHANGED
@@ -189,7 +189,7 @@ interface IResponse {
189
189
  getEvent<K extends DotNestedKeys<H3Event>>(key: K): DotNestedValue<H3Event, K>;
190
190
  }
191
191
 
192
- type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'apiResource' | 'name' | 'group' | 'route';
192
+ type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'apiResource' | 'group' | 'route';
193
193
  /**
194
194
  * Interface for the Router contract, defining methods for HTTP routing.
195
195
  */
@@ -232,7 +232,7 @@ interface IRouter {
232
232
  * @param controller - The controller class handling the resource.
233
233
  * @param middleware - Optional middleware array.
234
234
  */
235
- apiResource(path: string, controller: new (app: IApplication) => IController, middleware?: IMiddleware[]): Omit<this, RouterEnd>;
235
+ apiResource(path: string, controller: new (app: IApplication) => IController, middleware?: IMiddleware[]): Omit<this, RouterEnd | 'name'>;
236
236
  /**
237
237
  * Generates a URL for a named route.
238
238
  * @param name - The name of the route.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/shared",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Shared Utilities.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4,7 +4,7 @@ import { IApplication } from './IApplication'
4
4
  import { IRequest } from './IRequest'
5
5
  import { IResponse } from './IResponse'
6
6
 
7
- export type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'apiResource' | 'name' | 'group' | 'route';
7
+ export type RouterEnd = 'get' | 'delete' | 'put' | 'post' | 'apiResource' | 'group' | 'route';
8
8
 
9
9
  /**
10
10
  * Interface for the Router contract, defining methods for HTTP routing.
@@ -76,7 +76,7 @@ export interface IRouter {
76
76
  path: string,
77
77
  controller: new (app: IApplication) => IController,
78
78
  middleware?: IMiddleware[]
79
- ): Omit<this, RouterEnd>;
79
+ ): Omit<this, RouterEnd | 'name'>;
80
80
 
81
81
  /**
82
82
  * Generates a URL for a named route.