@rest-vir/run-service 0.17.2 → 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.
@@ -63,6 +63,10 @@ export async function preHandler(request, response, service, server, attachId) {
63
63
  response.send('Invalid body.');
64
64
  return undefined;
65
65
  }
66
+ const searchParams = handleSearchParams({ request, route });
67
+ if (!('data' in searchParams)) {
68
+ return handleHandlerResult(searchParams, response);
69
+ }
66
70
  const contextParams = {
67
71
  method: assertWrap.isEnumValue(request.method.toUpperCase(), HttpMethod),
68
72
  request,
@@ -73,11 +77,8 @@ export async function preHandler(request, response, service, server, attachId) {
73
77
  endpointDefinition: endpointDefinition,
74
78
  webSocketDefinition: webSocketDefinition,
75
79
  server,
80
+ searchParams: searchParams.data,
76
81
  };
77
- const searchParams = handleSearchParams({ request, route });
78
- if (!('data' in searchParams)) {
79
- return handleHandlerResult(searchParams, response);
80
- }
81
82
  try {
82
83
  const contextOutput = await service.createContext?.(contextParams);
83
84
  if (contextOutput?.reject) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rest-vir/run-service",
3
- "version": "0.17.2",
3
+ "version": "0.18.0",
4
4
  "description": "Run a service defined by @rest-vir/define-service and implemented by @rest-vir/implement-service.",
5
5
  "keywords": [
6
6
  "rest",
@@ -43,8 +43,8 @@
43
43
  "@augment-vir/common": "^31.16.0",
44
44
  "@augment-vir/node": "^31.16.0",
45
45
  "@fastify/websocket": "^11.0.2",
46
- "@rest-vir/define-service": "^0.17.2",
47
- "@rest-vir/implement-service": "^0.17.2",
46
+ "@rest-vir/define-service": "^0.18.0",
47
+ "@rest-vir/implement-service": "^0.18.0",
48
48
  "cluster-vir": "^0.1.0",
49
49
  "date-vir": "^7.3.1",
50
50
  "fastify": "^5.3.2",