koatty_core
Advanced tools
Comparing version 1.8.6 to 1.9.0-0
@@ -5,2 +5,14 @@ # Changelog | ||
## [1.9.0-0](https://github.com/koatty/koatty_core/compare/v1.8.6...v1.9.0-0) (2024-01-15) | ||
### Features | ||
* ctx增加requestParam、requestBody ([165e2de](https://github.com/koatty/koatty_core/commit/165e2de87a72e7d7bdb9b918883f107ed26ba03d)) | ||
### Bug Fixes | ||
* 修改路由定义 ([7a3b0a7](https://github.com/koatty/koatty_core/commit/7a3b0a76d43b9d9a18db286f4ae3c9a47df4561f)) | ||
### [1.8.6](https://github.com/koatty/koatty_core/compare/v1.8.5...v1.8.6) (2024-01-04) | ||
@@ -7,0 +19,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2024-01-04 21:35:52 | ||
* @Date: 2024-01-15 21:13:23 | ||
* @License: BSD (3-Clause) | ||
@@ -20,2 +20,4 @@ * @Copyright (c) - <richenlin(at)gmail.com> | ||
import { ServerWritableStream } from '@grpc/grpc-js'; | ||
import { ServiceDefinition } from '@grpc/grpc-js'; | ||
import { UntypedHandleCall } from '@grpc/grpc-js'; | ||
import { WebSocket } from 'ws'; | ||
@@ -57,2 +59,12 @@ | ||
/** | ||
* Implementation | ||
* | ||
* @export | ||
* @interface Implementation | ||
*/ | ||
export declare interface Implementation { | ||
[methodName: string]: UntypedHandleCall; | ||
} | ||
/** | ||
* InitOptions | ||
@@ -265,2 +277,13 @@ * | ||
setMetaData: (key: string, value: unknown) => void; | ||
/** | ||
* Get parsed query-string and path variable(koa ctx.query and ctx.params), | ||
* and set as an object. | ||
* @returns unknown | ||
*/ | ||
requestParam?: () => unknown; | ||
/** | ||
* Get parsed body(form variable and file object). | ||
* @returns Promise<unknown> ex: {post: {...}, file: {...}} | ||
*/ | ||
requestBody?: () => Promise<unknown>; | ||
} | ||
@@ -350,8 +373,29 @@ | ||
export declare interface KoattyRouter { | ||
app: Koatty; | ||
/** | ||
* router options | ||
*/ | ||
options: any; | ||
/** | ||
* KoaRouter or custom router | ||
*/ | ||
router: any; | ||
SetRouter: (path: string, func: Function, method?: any) => void; | ||
LoadRouter: (list: any[]) => void; | ||
ListRouter?: () => any; | ||
/** | ||
* set router map | ||
* @param name | ||
* @param impl | ||
* @returns | ||
*/ | ||
readonly SetRouter: (name: string, impl?: RouterImplementation) => void; | ||
/** | ||
* load router list and register handler | ||
* @param app | ||
* @param list | ||
* @returns | ||
*/ | ||
readonly LoadRouter: (app: Koatty, list: any[]) => Promise<void>; | ||
/** | ||
* return router list | ||
* @returns | ||
*/ | ||
readonly ListRouter?: () => Map<string, RouterImplementation>; | ||
} | ||
@@ -366,3 +410,2 @@ | ||
export declare interface KoattyServer { | ||
app: Koatty; | ||
options: any; | ||
@@ -380,2 +423,14 @@ server: unknownServer; | ||
/** | ||
* RouterImplementation | ||
* | ||
* @export | ||
* @interface RouterImplementation | ||
*/ | ||
export declare interface RouterImplementation { | ||
path?: string; | ||
service?: ServiceDefinition; | ||
implementation?: Function | Implementation; | ||
} | ||
declare type unknownServer = unknown; | ||
@@ -382,0 +437,0 @@ |
/*! | ||
* @Author: richen | ||
* @Date: 2024-01-04 21:35:39 | ||
* @Date: 2024-01-15 21:13:12 | ||
* @License: BSD (3-Clause) | ||
@@ -5,0 +5,0 @@ * @Copyright (c) - <richenlin(at)gmail.com> |
{ | ||
"name": "koatty_core", | ||
"version": "1.8.6", | ||
"version": "1.9.0-0", | ||
"description": "Koatty framework core", | ||
@@ -5,0 +5,0 @@ "scripts": { |
{ | ||
"name": "koatty_core", | ||
"version": "1.8.6", | ||
"version": "1.9.0-0", | ||
"description": "Koatty framework core", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64213
1691
2