koatty_container
Advanced tools
Comparing version 1.4.4 to 1.5.2
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.5.2](https://github.com/koatty/koatty_container/compare/v1.4.4...v1.5.2) (2021-07-09) | ||
### [1.4.4](https://github.com/koatty/koatty_container/compare/v1.4.3...v1.4.4) (2021-07-07) | ||
@@ -7,0 +9,0 @@ |
@@ -1,8 +0,1 @@ | ||
/** | ||
* @ author: richen | ||
* @ copyright: Copyright (c) - <richenlin(at)gmail.com> | ||
* @ license: MIT | ||
* @ version: 2020-05-10 11:41:01 | ||
*/ | ||
import Koa from "koa"; | ||
export declare type Scope = 'Singleton' | 'Prototype'; | ||
@@ -21,12 +14,6 @@ export declare type ComponentType = 'COMPONENT' | 'CONTROLLER' | 'MIDDLEWARE' | 'SERVICE'; | ||
*/ | ||
export interface Application extends Koa { | ||
export interface Application { | ||
env: string; | ||
rootPath: string; | ||
appPath: string; | ||
thinkPath: string; | ||
appDebug: boolean; | ||
options: any; | ||
trace: any; | ||
setMap: (key: string, value: any) => Map<string, unknown>; | ||
getMap: (key: string) => any; | ||
context: Context; | ||
use: (fn: Function) => any; | ||
@@ -36,3 +23,9 @@ config: (name: string, type?: string) => any; | ||
once(event: string, callback: () => void): any; | ||
createContext: (req: any, res: any) => any; | ||
/** | ||
* app metadata | ||
* | ||
* @memberof Application | ||
*/ | ||
getMetaData: (key: string) => unknown; | ||
setMetaData: (key: string, value: unknown) => Map<string, unknown>; | ||
} | ||
@@ -46,3 +39,3 @@ /** | ||
*/ | ||
export interface Context extends Koa.Context { | ||
export interface Context { | ||
/** | ||
@@ -57,2 +50,9 @@ * Replace ctx.throw | ||
throw(message: string, code?: number, status?: any): never; | ||
/** | ||
* context metadata | ||
* | ||
* @memberof Context | ||
*/ | ||
getMetaData: (key: string) => unknown; | ||
setMetaData: (key: string, value: unknown) => Map<string, unknown>; | ||
} | ||
@@ -59,0 +59,0 @@ /** |
{ | ||
"name": "koatty_container", | ||
"version": "1.4.4", | ||
"version": "1.5.2", | ||
"description": "IOC Container for Koatty.", | ||
@@ -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
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
1856912