@rest-vir/implement-service 0.17.1 → 0.18.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HttpMethod, type MaybePromise, type Values } from '@augment-vir/common';
|
|
2
|
-
import { type BaseServiceEndpointsInit, type BaseServiceWebSocketsInit, type EndpointDefinition, type EndpointPathBase, type MinimalService, type NoParam, type WebSocketDefinition, type WithFinalEndpointProps, type WithFinalWebSocketProps } from '@rest-vir/define-service';
|
|
2
|
+
import { type BaseSearchParams, type BaseServiceEndpointsInit, type BaseServiceWebSocketsInit, type EndpointDefinition, type EndpointPathBase, type MinimalService, type NoParam, type WebSocketDefinition, type WithFinalEndpointProps, type WithFinalWebSocketProps } from '@rest-vir/define-service';
|
|
3
3
|
import { type IncomingHttpHeaders } from 'node:http';
|
|
4
4
|
import { type RequireExactlyOne } from 'type-fest';
|
|
5
5
|
import { type ServerRequest, type ServerResponse } from '../util/data.js';
|
|
@@ -36,6 +36,7 @@ export type ContextInit<Context, ServiceName extends string, EndpointsInit exten
|
|
|
36
36
|
* @package [`@rest-vir/implement-service`](https://www.npmjs.com/package/@rest-vir/implement-service)
|
|
37
37
|
*/
|
|
38
38
|
export type ContextInitParameters<ServiceName extends string = any, EndpointsInit extends BaseServiceEndpointsInit | NoParam = NoParam, WebSocketsInit extends BaseServiceWebSocketsInit | NoParam = NoParam> = {
|
|
39
|
+
searchParams: (WebSocketsInit extends NoParam ? BaseSearchParams | undefined : WithFinalWebSocketProps<Values<WebSocketsInit>, any>['SearchParamsType']) | (EndpointsInit extends NoParam ? BaseSearchParams | undefined : WithFinalEndpointProps<Values<EndpointsInit>, any>['SearchParamsType']);
|
|
39
40
|
service: MinimalService<ServiceName>;
|
|
40
41
|
requestHeaders: IncomingHttpHeaders;
|
|
41
42
|
method: HttpMethod;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rest-vir/implement-service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Implement a service defined by @rest-vir/define-service.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rest",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@augment-vir/assert": "^31.16.0",
|
|
43
43
|
"@augment-vir/common": "^31.16.0",
|
|
44
|
-
"@rest-vir/define-service": "^0.
|
|
44
|
+
"@rest-vir/define-service": "^0.18.0",
|
|
45
45
|
"@types/ws": "^8.18.1",
|
|
46
46
|
"fastify": "^5.3.2",
|
|
47
47
|
"path-to-regexp": "^8.2.0",
|