kamboja-core
Advanced tools
Comparing version 0.5.0-alpha.2ef874e4 to 0.5.0-alpha.3421a6a8
import { HttpRequest } from "../http"; | ||
import { Handshake } from "../socket"; | ||
import { Validator } from "../validator"; | ||
import { InvocationBase } from "./invocation-base"; | ||
export interface BaseController { | ||
context: HttpRequest | Handshake; | ||
invocation: InvocationBase; | ||
validator: Validator; | ||
} |
@@ -7,2 +7,3 @@ export * from "./application"; | ||
export * from "./invocation"; | ||
export * from "./invocation-base"; | ||
export * from "./kamboja-option"; | ||
@@ -9,0 +10,0 @@ export * from "./log-type"; |
@@ -7,3 +7,4 @@ import { ActionResult } from "./action-result"; | ||
import { Facade } from "../index"; | ||
export declare abstract class Invocation { | ||
import { InvocationBase } from "./invocation-base"; | ||
export declare abstract class Invocation implements InvocationBase { | ||
abstract proceed(): Promise<ActionResult>; | ||
@@ -10,0 +11,0 @@ context: HttpRequest | Handshake; |
@@ -1,29 +0,13 @@ | ||
/// <reference types="node" /> | ||
import { HttpMethod } from "./http-method"; | ||
import { AuthUser } from "../security"; | ||
import * as Url from "url"; | ||
export interface HttpRequest { | ||
contextType: "HttpRequest"; | ||
httpVersion: string; | ||
httpMethod: HttpMethod; | ||
headers: { | ||
[key: string]: string; | ||
}; | ||
cookies: { | ||
[key: string]: string; | ||
}; | ||
params: { | ||
[key: string]: string; | ||
}; | ||
user: AuthUser; | ||
body: any; | ||
referrer: string; | ||
url: Url.Url; | ||
route: string; | ||
getHeader(key: string): string | undefined; | ||
getCookie(key: string): string | undefined; | ||
getParam(key: string): string | undefined; | ||
getAccepts(key: string | string[]): string | boolean; | ||
isAuthenticated(): boolean; | ||
getUserRole(): string; | ||
route: string; | ||
} |
@@ -1,2 +0,2 @@ | ||
export { Application, BaseController, Engine, Facility, Invocation, KambojaOption, LogType, MethodDecorator, Middleware, MiddlewaresType, Response, MiddlewareFunction } from "./framework"; | ||
export { Application, BaseController, Engine, Facility, Invocation, KambojaOption, LogType, MethodDecorator, Middleware, MiddlewaresType, Response, MiddlewareFunction, InvocationBase } from "./framework"; | ||
export { Cookie, CookieOptions, HttpError, HttpMethod, HttpRequest } from "./http"; | ||
@@ -3,0 +3,0 @@ export { DependencyResolver, IdentifierResolver, PathResolver } from "./resolver"; |
{ | ||
"name": "kamboja-core", | ||
"version": "0.5.0-alpha.2ef874e4", | ||
"version": "0.5.0-alpha.3421a6a8", | ||
"description": "Core library of KambojaJS", | ||
@@ -24,3 +24,3 @@ "main": "lib/index.js", | ||
"@types/node": "^8.0.28", | ||
"kecubung": "0.5.0-alpha.2ef874e4", | ||
"kecubung": "0.5.0-alpha.3421a6a8", | ||
"lodash": "^4.17.4", | ||
@@ -27,0 +27,0 @@ "reflect-metadata": "^0.1.10", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29994
96
704
0
+ Addedkecubung@0.5.0-alpha.3421a6a8(transitive)
- Removedkecubung@0.5.0-alpha.2ef874e4(transitive)