Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

adonis-framework

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-framework - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

providers/SessionProvider.js

1

index.js

@@ -13,2 +13,3 @@ 'use strict';

Request: require('./src/Request'),
Session : require('./src/Session'),
Env: require('./src/Env'),

@@ -15,0 +16,0 @@ View: require('./src/View'),

2

package.json
{
"name": "adonis-framework",
"version": "1.0.9",
"version": "1.1.0",
"description": "Adonis framework a loosely coupled http server for adonis application, it does all the required hard work to setup a managable http server with depdendency injection in place.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,3 +19,3 @@ 'use strict'

static get inject(){
return ["Adonis/Src/Route","Adonis/Src/Request","Adonis/Src/Response","Adonis/Src/Logger"]
return ["Adonis/Src/Route","Adonis/Src/Request","Adonis/Src/Response","Adonis/Src/Logger","Adonis/Src/Session"]
}

@@ -22,0 +22,0 @@

@@ -40,4 +40,4 @@ 'use strict'

NodeRes.prototype.cookie = function (key, value, options) {
if (!this._cookies) {
this._cookies = {}
if(!this.response._cookies){
this.response._cookies = {}
}

@@ -47,4 +47,4 @@ if (!key) {

}
this._cookies[key] = {key, options, value}
return this
this.response._cookies[key] = {key:key,options:options,value:value}
return this;
}

@@ -71,5 +71,5 @@

*/
NodeRes.prototype.send = function (value) {
if (this._cookies) {
Cookies.attachObject(this.response, this._cookies)
NodeRes.prototype.send = function (value){
if(this.response._cookies){
Cookies.attachObject(this.response,this.response._cookies)
}

@@ -76,0 +76,0 @@ this._send(value)

@@ -14,3 +14,4 @@ 'use strict'

function Server (Route, Request, Response, Logger) {
function Server (Route, Request, Response, Logger, Session) {
this.Logger = Logger

@@ -29,5 +30,14 @@

let response = new Response(req, res)
let session = new Session(req,res)
let request = new Request(req)
/**
* setting up session on request object which
* makes session methods available on
* request object itself.
* @type {[type]}
*/
request.session = session
/**
* if request is for a static resource , serve static resource

@@ -34,0 +44,0 @@ * and return

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