@adonisjs/http-server
Advanced tools
Comparing version 1.7.4 to 1.8.0
@@ -9,2 +9,3 @@ /** | ||
import { EncryptionContract } from '@ioc:Adonis/Core/Encryption'; | ||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'; | ||
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'http'; | ||
@@ -18,2 +19,3 @@ /** | ||
response: ServerResponse; | ||
ctx?: HttpContextContract; | ||
id(): string | undefined; | ||
@@ -20,0 +22,0 @@ setInitialBody(body: any): void; |
@@ -9,2 +9,3 @@ /** | ||
import { MacroableConstructorContract } from 'macroable'; | ||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'; | ||
/** | ||
@@ -41,2 +42,3 @@ * Types from which response header can be casted to a | ||
response: ServerResponse; | ||
ctx?: HttpContextContract; | ||
getHeader(key: string): string | string[] | number | undefined; | ||
@@ -43,0 +45,0 @@ header(key: string, value: CastableHeader): this; |
@@ -39,2 +39,10 @@ "use strict"; | ||
this.subdomains = {}; | ||
/** | ||
* Creating the circular reference. We do this, since request and response | ||
* are meant to be extended and at times people would want to access | ||
* other ctx properties like `logger`, `profiler` inside those | ||
* extended methods. | ||
*/ | ||
this.request.ctx = this; | ||
this.response.ctx = this; | ||
} | ||
@@ -41,0 +49,0 @@ /** |
@@ -11,2 +11,3 @@ /** | ||
import { EncryptionContract } from '@ioc:Adonis/Core/Encryption'; | ||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'; | ||
import { RequestContract, RequestConfigContract } from '@ioc:Adonis/Core/Request'; | ||
@@ -28,8 +29,2 @@ /** | ||
/** | ||
* Parses copy of the URL with query string as a string and not | ||
* object. This is done to build URL's with query string without | ||
* stringifying the object | ||
*/ | ||
parsedUrl: UrlWithStringQuery; | ||
/** | ||
* Request body set using `setBody` method | ||
@@ -69,2 +64,13 @@ */ | ||
protected static getters: {}; | ||
/** | ||
* Parses copy of the URL with query string as a string and not | ||
* object. This is done to build URL's with query string without | ||
* stringifying the object | ||
*/ | ||
parsedUrl: UrlWithStringQuery; | ||
/** | ||
* The ctx will be set by the context itself. It creates a circular | ||
* reference | ||
*/ | ||
ctx?: HttpContextContract; | ||
constructor(request: IncomingMessage, response: ServerResponse, encryption: EncryptionContract, config: DeepReadonly<RequestConfigContract>); | ||
@@ -71,0 +77,0 @@ /** |
@@ -51,8 +51,2 @@ "use strict"; | ||
/** | ||
* Parses copy of the URL with query string as a string and not | ||
* object. This is done to build URL's with query string without | ||
* stringifying the object | ||
*/ | ||
this.parsedUrl = url_1.parse(this.request.url, false); | ||
/** | ||
* Request body set using `setBody` method | ||
@@ -87,2 +81,8 @@ */ | ||
this.parsedCookies = null; | ||
/** | ||
* Parses copy of the URL with query string as a string and not | ||
* object. This is done to build URL's with query string without | ||
* stringifying the object | ||
*/ | ||
this.parsedUrl = url_1.parse(this.request.url, false); | ||
this.parseQueryString(); | ||
@@ -89,0 +89,0 @@ } |
@@ -11,2 +11,3 @@ /** | ||
import { ResponseContract, CastableHeader, LazyBody, ResponseContentType, ResponseStream, ResponseConfigContract } from '@ioc:Adonis/Core/Response'; | ||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'; | ||
/** | ||
@@ -39,2 +40,6 @@ * The response is a wrapper over [ServerResponse](https://nodejs.org/api/http.html#http_class_http_serverresponse) | ||
private config; | ||
protected static macros: {}; | ||
protected static getters: {}; | ||
private headers; | ||
private explicitStatus; | ||
/** | ||
@@ -48,6 +53,7 @@ * Lazy body is used to set the response body. However, do not | ||
lazyBody: LazyBody | null; | ||
protected static macros: {}; | ||
protected static getters: {}; | ||
private headers; | ||
private explicitStatus; | ||
/** | ||
* The ctx will be set by the context itself. It creates a circular | ||
* reference | ||
*/ | ||
ctx?: HttpContextContract; | ||
constructor(request: IncomingMessage, response: ServerResponse, config: DeepReadonly<ResponseConfigContract>); | ||
@@ -54,0 +60,0 @@ /** |
@@ -100,2 +100,4 @@ "use strict"; | ||
this.config = config; | ||
this.headers = {}; | ||
this.explicitStatus = false; | ||
/** | ||
@@ -109,4 +111,2 @@ * Lazy body is used to set the response body. However, do not | ||
this.lazyBody = null; | ||
this.headers = {}; | ||
this.explicitStatus = false; | ||
} | ||
@@ -113,0 +113,0 @@ /** |
{ | ||
"name": "@adonisjs/http-server", | ||
"version": "1.7.4", | ||
"version": "1.8.0", | ||
"description": "Extracted copy of AdonisJs HTTP server along with it's router", | ||
@@ -95,3 +95,3 @@ "main": "build/providers/HttpServerProvider.js", | ||
"dependencies": { | ||
"@poppinss/cookie": "^1.0.7", | ||
"@poppinss/cookie": "^1.0.8", | ||
"@poppinss/utils": "^2.1.2", | ||
@@ -98,0 +98,0 @@ "accepts": "^1.3.7", |
223916
6472
Updated@poppinss/cookie@^1.0.8