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.1db2ae04 to 0.5.0-alpha.2ae50751

3

lib/framework/base-controller.d.ts

@@ -6,5 +6,6 @@ import { HttpRequest } from "../http";

export interface BaseController {
context: HttpRequest | Handshake;
request: HttpRequest;
handshake: Handshake;
invocation: InvocationBase;
validator: Validator;
}

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

@@ -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.1db2ae04",
"version": "0.5.0-alpha.2ae50751",
"description": "Core library of KambojaJS",

@@ -24,3 +24,3 @@ "main": "lib/index.js",

"@types/node": "^8.0.28",
"kecubung": "0.5.0-alpha.1db2ae04",
"kecubung": "0.5.0-alpha.2ae50751",
"lodash": "^4.17.4",

@@ -27,0 +27,0 @@ "reflect-metadata": "^0.1.10",

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