koa-ts-core 0.0.9-beta.2 → 0.0.9-beta.3
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.
- package/package.json +2 -3
- package/dist/base/exception.d.ts +0 -18
- package/dist/base/index.d.ts +0 -1
- package/dist/constant.d.ts +0 -5
- package/dist/decorate/index.d.ts +0 -1
- package/dist/decorate/router_decorate.d.ts +0 -16
- package/dist/index.cjs.js +0 -39
- package/dist/index.d.ts +0 -5
- package/dist/index.esm.js +0 -39
- package/dist/init/address.d.ts +0 -8
- package/dist/init/index.d.ts +0 -16
- package/dist/init/register_controller.d.ts +0 -9
- package/dist/init/register_env.d.ts +0 -5
- package/dist/init/register_route.d.ts +0 -10
- package/dist/init/render_doc.d.ts +0 -2
- package/dist/middleware/context_middleware.d.ts +0 -15
- package/dist/middleware/exception_middleware.d.ts +0 -10
- package/dist/middleware/request_params_middleware.d.ts +0 -7
- package/dist/router.d.ts +0 -2
- package/dist/types/meta_data.d.ts +0 -16
- package/dist/types/route.d.ts +0 -26
- package/dist/utils/context_store.d.ts +0 -8
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/path.d.ts +0 -46
- package/dist/utils/rsp.d.ts +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koa-ts-core",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.3",
|
|
4
4
|
"description": "koa-ts-core",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "npx rollup -c",
|
|
14
14
|
"link": "npm run build:dev && pnpm link --dir ..",
|
|
15
15
|
"build:dev": "NODE_ENV=development npx rollup -c --bundleConfigAsCjs",
|
|
16
|
-
"publish": "npm run build
|
|
16
|
+
"publish": "npm run build",
|
|
17
17
|
"gen-doc": "npx ts-node src/generate.ts"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"@types/koa-router": "^7.4.8",
|
|
44
44
|
"@types/node": "^22.13.4",
|
|
45
45
|
"@types/pug": "^2.0.10",
|
|
46
|
-
"release-it": "^18.1.2",
|
|
47
46
|
"rollup": "^4.34.9",
|
|
48
47
|
"rollup-plugin-copy": "^3.5.0",
|
|
49
48
|
"rollup-plugin-delete": "^2.1.0",
|
package/dist/base/exception.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface ExceptionOptions {
|
|
2
|
-
message: string;
|
|
3
|
-
code: number;
|
|
4
|
-
data?: Record<string, any>;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* @class BaseException 定义异常基类
|
|
8
|
-
*/
|
|
9
|
-
declare abstract class BaseException extends Error {
|
|
10
|
-
code: number;
|
|
11
|
-
constructor(options?: ExceptionOptions);
|
|
12
|
-
get toRspOptions(): {
|
|
13
|
-
code: number;
|
|
14
|
-
message: string;
|
|
15
|
-
data: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export default BaseException;
|
package/dist/base/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as BaseException } from "./exception";
|
package/dist/constant.d.ts
DELETED
package/dist/decorate/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./router_decorate";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { HttpMethod } from '../types/route';
|
|
2
|
-
export declare const INDEX_ROUTE = "index";
|
|
3
|
-
/**
|
|
4
|
-
* 注册路由
|
|
5
|
-
* @param method 请求路由方式
|
|
6
|
-
* @param path? 路由地址, 可选,默认为方法名字
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export declare function Router(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) => any;
|
|
10
|
-
/**
|
|
11
|
-
* 注册权限路由路由
|
|
12
|
-
* @param method 请求路由方式
|
|
13
|
-
* @param path? 路由地址, 可选,默认为方法名字
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
export declare function AuthRouter(method?: HttpMethod, path?: string): (target: any, functionName: string, descriptor: PropertyDescriptor) => any;
|