New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kamboja-core

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kamboja-core - npm Package Compare versions

Comparing version 0.5.0-alpha.70d3c872 to 0.5.0-alpha.71daf028

lib/framework/invocation-base.d.ts

5

lib/framework/base-controller.d.ts
import { HttpRequest } from "../http";
import { Handshake } from "../socket";
import { Validator } from "../validator";
import { InvocationBase } from "./invocation-base";
export interface BaseController {
context: HttpRequest | Handshake;
request: HttpRequest;
handshake: Handshake;
invocation: InvocationBase;
validator: Validator;
}

2

lib/framework/engine.d.ts
import { RouteInfo } from "../router";
import { KambojaOption } from "./kamboja-option";
export interface Engine {
init(routes: RouteInfo[], option: KambojaOption): any;
init(routes: RouteInfo[], option: KambojaOption, app?: any): any;
}

@@ -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";

@@ -13,4 +13,4 @@ "use strict";

exports.ValidationTypesAccepted = validator_1.ValidationTypesAccepted;
class ActionResult {
constructor(body, status, type) {
var ActionResult = /** @class */ (function () {
function ActionResult(body, status, type) {
this.body = body;

@@ -22,7 +22,7 @@ this.status = status;

}
setHeader(key, value) {
ActionResult.prototype.setHeader = function (key, value) {
this.header[key] = value;
return this;
}
setCookie(key, value, options) {
};
ActionResult.prototype.setCookie = function (key, value, options) {
if (!this.cookies)

@@ -32,12 +32,12 @@ this.cookies = [];

return this;
}
setStatus(status) {
};
ActionResult.prototype.setStatus = function (status) {
this.status = status;
return this;
}
setType(type) {
};
ActionResult.prototype.setType = function (type) {
this.type = type;
return this;
}
broadcast(event, data) {
};
ActionResult.prototype.broadcast = function (event, data) {
if (!this.events)

@@ -47,4 +47,4 @@ this.events = [];

return this;
}
emit(event, id, data) {
};
ActionResult.prototype.emit = function (event, id, data) {
if (!this.events)

@@ -54,7 +54,8 @@ this.events = [];

return this;
}
execute(context, response, routeInfo) {
};
ActionResult.prototype.execute = function (context, response, routeInfo) {
response.send(this);
}
}
};
return ActionResult;
}());
exports.ActionResult = ActionResult;
{
"name": "kamboja-core",
"version": "0.5.0-alpha.70d3c872",
"version": "0.5.0-alpha.71daf028",
"description": "Core library of KambojaJS",

@@ -22,15 +22,15 @@ "main": "lib/index.js",

"dependencies": {
"@types/lodash": "^4.14.74",
"@types/node": "^8.0.28",
"kecubung": "0.5.0-alpha.70d3c872",
"@types/lodash": "^4.14.86",
"@types/node": "^8.0.53",
"kecubung": "0.5.0-alpha.71daf028",
"lodash": "^4.17.4",
"reflect-metadata": "^0.1.10",
"tslib": "^1.7.1"
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/chai": "^4.0.4",
"@types/mocha": "^2.2.43",
"@types/sinon": "^2.3.4",
"@types/chai": "^4.0.6",
"@types/mocha": "^2.2.44",
"@types/sinon": "^4.0.0",
"chai": "^4.1.2",
"coveralls": "^2.13.1",
"coveralls": "^3.0.0",
"del": "^3.0.0",

@@ -41,8 +41,8 @@ "gulp": "^3.9.1",

"gulp-sourcemaps": "^2.6.1",
"gulp-typescript": "^3.2.2",
"mocha": "^3.5.3",
"run-sequence": "^2.1.0",
"sinon": "^3.2.1",
"typescript": "^2.5.2"
"gulp-typescript": "^3.2.3",
"mocha": "^4.0.1",
"run-sequence": "^2.2.0",
"sinon": "^4.1.2",
"typescript": "^2.6.2"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc