koatty_core
Advanced tools
Comparing version 1.10.0-16 to 1.10.0-18
@@ -5,2 +5,11 @@ # Changelog | ||
## [1.10.0-18](https://github.com/koatty/koatty_core/compare/v1.10.0-17...v1.10.0-18) (2024-11-11) | ||
## [1.10.0-17](https://github.com/koatty/koatty_core/compare/v1.10.0-16...v1.10.0-17) (2024-11-08) | ||
### Bug Fixes | ||
* server ([9a8a1aa](https://github.com/koatty/koatty_core/commit/9a8a1aa7ef40d2cea6c0234de7ae87e0bbfdaa1f)) | ||
## [1.10.0-16](https://github.com/koatty/koatty_core/compare/v1.10.0-15...v1.10.0-16) (2024-11-08) | ||
@@ -7,0 +16,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2024-11-08 09:39:55 | ||
* @Date: 2024-11-11 12:18:43 | ||
* @License: BSD (3-Clause) | ||
@@ -10,2 +10,4 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
import { Http2ServerRequest } from 'http2'; | ||
import { Http2ServerResponse } from 'http2'; | ||
import { IAspect } from 'koatty_container'; | ||
@@ -18,2 +20,3 @@ import { IncomingMessage } from 'http'; | ||
import { ServerReadableStreamImpl } from '@grpc/grpc-js/build/src/server-call'; | ||
import { ServerResponse } from 'http'; | ||
import { ServerUnaryCall } from '@grpc/grpc-js'; | ||
@@ -250,7 +253,7 @@ import { ServerUnaryCallImpl } from '@grpc/grpc-js/build/src/server-call'; | ||
* @param {*} res | ||
* @param {string} [protocol] | ||
* @param {KoattyProtocol} [protocol] | ||
* @returns {KoattyContext} {*} | ||
* @memberof Koatty | ||
*/ | ||
createContext(req: any, res: any, protocol?: string): KoattyContext; | ||
createContext(req: RequestType, res: ResponseType, protocol?: KoattyProtocol): any; | ||
/** | ||
@@ -273,3 +276,3 @@ * listening and start server | ||
*/ | ||
callback(protocol?: string, reqHandler?: (ctx: KoattyContext) => Promise<any>): (req: unknown, res: unknown) => Promise<any>; | ||
callback(protocol?: KoattyProtocol, reqHandler?: (ctx: KoattyContext) => Promise<any>): (req: RequestType, res: ResponseType) => Promise<any>; | ||
/** | ||
@@ -285,2 +288,6 @@ * Handle request in callback. | ||
/** | ||
* @description: handle Response & opentrace | ||
* @return {*} | ||
*/ | ||
/** | ||
* registration exception handling | ||
@@ -349,3 +356,3 @@ * | ||
*/ | ||
readonly createContext: (req: any, res: any, protocol?: string) => KoattyContext; | ||
readonly createContext: (req: any, res: any, protocol?: KoattyProtocol) => KoattyContext; | ||
/** | ||
@@ -363,4 +370,4 @@ * Listening and start server | ||
*/ | ||
readonly callback: (protocol?: string, reqHandler?: (ctx: KoattyContext) => Promise<any>) => { | ||
(req: unknown, res: unknown): Promise<any>; | ||
readonly callback: (protocol?: KoattyProtocol, reqHandler?: (ctx: KoattyContext) => Promise<any>) => { | ||
(req: RequestType, res: ResponseType): Promise<any>; | ||
}; | ||
@@ -525,2 +532,15 @@ } | ||
/** | ||
* @description: koatty server protocol | ||
* @return {*} | ||
*/ | ||
export declare enum KoattyProtocol { | ||
HTTP = "http", | ||
HTTPS = "https", | ||
HTTP2 = "http2", | ||
GRPC = "grpc", | ||
WS = "ws", | ||
WSS = "wss" | ||
} | ||
/** | ||
* Router interface | ||
@@ -598,7 +618,7 @@ * | ||
export declare type RequestType = IncomingMessage & IRpcServerCall<any, any> & { | ||
export declare type RequestType = IncomingMessage | Http2ServerRequest | IRpcServerCall<any, any> | { | ||
data: Buffer | ArrayBuffer | Buffer[]; | ||
}; | ||
export declare type ResponseType = OutgoingMessage & IRpcServerCallback<any> & IWebSocket; | ||
export declare type ResponseType = ServerResponse | Http2ServerResponse | OutgoingMessage | IRpcServerCallback<any> | IWebSocket; | ||
@@ -615,3 +635,3 @@ /** | ||
service?: ServiceDefinition; | ||
implementation?: IHttpImplementation | IRpcImplementation | IWsImplementation; | ||
implementation?: IHttpImplementation & IRpcImplementation & IWsImplementation; | ||
} | ||
@@ -618,0 +638,0 @@ |
{ | ||
"name": "koatty_core", | ||
"version": "1.10.0-16", | ||
"version": "1.10.0-18", | ||
"description": "Koatty framework core", | ||
@@ -53,2 +53,3 @@ "scripts": { | ||
"@types/on-finished": "^2.x.x", | ||
"@types/supertest": "^6.x.x", | ||
"@types/ws": "^8.x.x", | ||
@@ -68,2 +69,3 @@ "@typescript-eslint/eslint-plugin": "^8.x.x", | ||
"standard-version": "^9.x.x", | ||
"supertest": "^7.x.x", | ||
"ts-jest": "^29.x.x", | ||
@@ -76,8 +78,9 @@ "ts-node": "^10.x.x", | ||
"http-assert": "^1.5.0", | ||
"koa": "^2.15.3", | ||
"koa": "^2.x.x", | ||
"koa-compose": "^4.1.0", | ||
"koatty_container": "^1.x.x", | ||
"koatty_exception": "1.4.6", | ||
"koatty_exception": "^1.x.x", | ||
"koatty_lib": "^1.x.x", | ||
"koatty_logger": "^2.x.x", | ||
"koatty_trace": "^1.x.x", | ||
"on-finished": "^2.4.1" | ||
@@ -90,4 +93,5 @@ }, | ||
"koatty_lib": "^1.x.x", | ||
"koatty_logger": "^2.x.x" | ||
"koatty_logger": "^2.x.x", | ||
"koatty_trace": "^1.x.x" | ||
} | ||
} |
{ | ||
"name": "koatty_core", | ||
"version": "1.10.0-16", | ||
"version": "1.10.0-18", | ||
"description": "Koatty framework core", | ||
@@ -53,2 +53,3 @@ "scripts": { | ||
"@types/on-finished": "^2.x.x", | ||
"@types/supertest": "^6.x.x", | ||
"@types/ws": "^8.x.x", | ||
@@ -68,2 +69,3 @@ "@typescript-eslint/eslint-plugin": "^8.x.x", | ||
"standard-version": "^9.x.x", | ||
"supertest": "^7.x.x", | ||
"ts-jest": "^29.x.x", | ||
@@ -76,8 +78,9 @@ "ts-node": "^10.x.x", | ||
"http-assert": "^1.5.0", | ||
"koa": "^2.15.3", | ||
"koa": "^2.x.x", | ||
"koa-compose": "^4.1.0", | ||
"koatty_container": "^1.x.x", | ||
"koatty_exception": "1.4.6", | ||
"koatty_exception": "^1.x.x", | ||
"koatty_lib": "^1.x.x", | ||
"koatty_logger": "^2.x.x", | ||
"koatty_trace": "^1.x.x", | ||
"on-finished": "^2.4.1" | ||
@@ -90,4 +93,5 @@ }, | ||
"koatty_lib": "^1.x.x", | ||
"koatty_logger": "^2.x.x" | ||
"koatty_logger": "^2.x.x", | ||
"koatty_trace": "^1.x.x" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
188506
4400
15
34
7
+ Addedkoatty_trace@^1.x.x
+ Addedkoatty_exception@1.5.3(transitive)
- Removedkoatty_exception@1.4.6(transitive)
Updatedkoa@^2.x.x
Updatedkoatty_exception@^1.x.x