Skip to content

Commit 48613b1

Browse files
authored
Merge pull request #43 from ty-ras/issue/42-contextless-endpoints
#42 Enabling support for contextless endpoints.
2 parents eb40073 + d644dd6 commit 48613b1

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ty-ras/server-node",
3-
"version": "2.2.1",
3+
"version": "2.3.0",
44
"author": {
55
"name": "Stanislav Muhametsin",
66
"email": "[email protected]",
@@ -31,7 +31,7 @@
3131
}
3232
},
3333
"dependencies": {
34-
"@ty-ras/server": "^2.2.1"
34+
"@ty-ras/server": "^2.3.0"
3535
},
3636
"devDependencies": {
3737
"@ava/get-port": "2.0.0",

server/src/middleware.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* @file This file contains helper function to create Node server callback.
33
*/
44

5-
import type * as ep from "@ty-ras/endpoint";
65
import * as server from "@ty-ras/server";
76
import type * as context from "./context.types";
87
import * as internal from "./internal";
@@ -18,7 +17,7 @@ import type * as http2 from "node:http2";
1817
* @returns The Koa middleware which will serve the given endpoints.
1918
*/
2019
export const createMiddleware = <TStateInfo, TState>(
21-
endpoints: ReadonlyArray<ep.AppEndpoint<context.ServerContext, TStateInfo>>,
20+
endpoints: server.ServerEndpoints<context.ServerContext, TStateInfo>,
2221
createState?: context.CreateState<TStateInfo>,
2322
events?: server.ServerEventHandler<
2423
server.GetContext<context.ServerContext>,

server/src/server.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* @file This file exposes function to create Node HTTP 1 or 2 server serving giving TyRAS {@link ep.AppEndpoint}s.
33
*/
44

5-
import * as ep from "@ty-ras/endpoint";
65
import * as server from "@ty-ras/server";
76

87
import type * as ctx from "./context.types";
@@ -96,7 +95,7 @@ export interface ServerCreationOptions<
9695
/**
9796
* The TyRAS {@link ep.AppEndpoint}s to server via returned HTTP server.
9897
*/
99-
endpoints: ReadonlyArray<ep.AppEndpoint<TServerContext, TStateInfo>>;
98+
endpoints: server.ServerEndpoints<TServerContext, TStateInfo>;
10099

101100
/**
102101
* The callback to create endpoint-specific state objects.

server/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,10 @@
445445
dependencies:
446446
"@ty-ras/endpoint" "^2.0.0"
447447

448-
"@ty-ras/server@^2.2.1":
449-
version "2.2.1"
450-
resolved "https://registry.yarnpkg.com/@ty-ras/server/-/server-2.2.1.tgz#747995863d54ad828191e2cdb6f528231c24939b"
451-
integrity sha512-Qy22YPpjcqrBP698d2Sm5LqmX39hq3aLuOngTRxKhD0kU2y4GooKgrMDCmaKkfteP/0fqoqZG4c20ukeTtPqcg==
448+
"@ty-ras/server@^2.3.0":
449+
version "2.3.0"
450+
resolved "https://registry.yarnpkg.com/@ty-ras/server/-/server-2.3.0.tgz#f168669b29f777130823bf583341f83f0ade8ec0"
451+
integrity sha512-0DhQqHHwyfDP2YJQhbxl+TAs4yDXKaBAVgs53+nCS0lr0M7Surc1MZ9AUeDQtcZJKc8FkWhUhUpt9aOQjZ89EA==
452452
dependencies:
453453
"@ty-ras/endpoint" "^2.0.0"
454454

0 commit comments

Comments
 (0)