ngx-cookie-service
Advanced tools
Comparing version 12.1.0-rc.1 to 12.1.0-rc.2
@@ -556,6 +556,6 @@ (function (global, factory) { | ||
var ServerCookieService = /** @class */ (function () { | ||
function ServerCookieService(cookieService, platformId, request) { | ||
function ServerCookieService(cookieService, platformId, req) { | ||
this.cookieService = cookieService; | ||
this.platformId = platformId; | ||
this.request = request; | ||
this.req = req; | ||
this.isServer = i1.isPlatformServer(this.platformId); | ||
@@ -577,3 +577,3 @@ } | ||
var regExp = CookieService.getCookieRegExp(name); | ||
return regExp.test((_a = this.request) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
return regExp.test((_a = this.req) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
} | ||
@@ -596,3 +596,3 @@ return true; | ||
var regExp = CookieService.getCookieRegExp(name); | ||
var result = regExp.exec((_a = this.request) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
var result = regExp.exec((_a = this.req) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
return result[1] ? CookieService.safeDecodeURIComponent(result[1]) : ''; | ||
@@ -599,0 +599,0 @@ } |
@@ -12,6 +12,6 @@ // This service is based on the `ng2-cookies` package which sadly is not a service and does | ||
export class ServerCookieService { | ||
constructor(cookieService, platformId, request) { | ||
constructor(cookieService, platformId, req) { | ||
this.cookieService = cookieService; | ||
this.platformId = platformId; | ||
this.request = request; | ||
this.req = req; | ||
this.isServer = isPlatformServer(this.platformId); | ||
@@ -33,3 +33,3 @@ } | ||
const regExp = CookieService.getCookieRegExp(name); | ||
return regExp.test((_a = this.request) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
return regExp.test((_a = this.req) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
} | ||
@@ -52,3 +52,3 @@ return true; | ||
const regExp = CookieService.getCookieRegExp(name); | ||
const result = regExp.exec((_a = this.request) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
const result = regExp.exec((_a = this.req) === null || _a === void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raWUnKSk7XG4gICAgfVxuICAgIHJldHVybiB0cnVlO1xuICB9XG5cbiAgLyoqXG4gICAqIEdldCBjb29raWVzIGJ5IG5hbWVcbiAgICpcbiAgICogQHBhcmFtIG5hbWUgQ29va2llIG5hbWVcbiAgICogQHJldHVybnMgcHJvcGVydHkgdmFsdWVcbiAgICpcbiAgICogQGF1dGhvcjogU3RlcGFuIFN1dm9yb3ZcbiAgICogQHNpbmNlOiAxLjAuMFxuICAgKi9cbiAgZ2V0KG5hbWU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgaWYgKHRoaXMuaXNTZXJ2ZXIpIHtcbiAgICAgIG5hbWUgPSBlbmNvZGVVUklDb21wb25lbnQobmFtZSk7XG5cbiAgICAgIGNvbnN0IHJlZ0V4cDogUmVnRXhwID0gQ29va2llU2VydmljZS5nZXRDb29raWVSZWdFeHAobmFtZSk7XG4gICAgICBjb25zdCByZXN1bHQ6IFJlZ0V4cEV4ZWNBcnJheSA9IHJlZ0V4cC5leGVjKHRoaXMucmVxPy5oZWFkZXJzLmdldCgnY29va2llJykpO1xuXG4gICAgICByZXR1cm4gcmVzdWx0WzFdID8gQ29va2llU2VydmljZS5zYWZlRGVjb2RlVVJJQ29tcG9uZW50KHJlc3VsdFsxXSkgOiAnJztcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuICcnO1xuICAgIH1cbiAgfVxufVxuIl19 |
@@ -213,6 +213,6 @@ import * as i2 from '@nguniversal/express-engine/tokens'; | ||
class ServerCookieService { | ||
constructor(cookieService, platformId, request) { | ||
constructor(cookieService, platformId, req) { | ||
this.cookieService = cookieService; | ||
this.platformId = platformId; | ||
this.request = request; | ||
this.req = req; | ||
this.isServer = isPlatformServer(this.platformId); | ||
@@ -234,3 +234,3 @@ } | ||
const regExp = CookieService.getCookieRegExp(name); | ||
return regExp.test((_a = this.request) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
return regExp.test((_a = this.req) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
} | ||
@@ -253,3 +253,3 @@ return true; | ||
const regExp = CookieService.getCookieRegExp(name); | ||
const result = regExp.exec((_a = this.request) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
const result = regExp.exec((_a = this.req) === null || _a === void 0 ? void 0 : _a.headers.get('cookie')); | ||
return result[1] ? CookieService.safeDecodeURIComponent(result[1]) : ''; | ||
@@ -256,0 +256,0 @@ } |
@@ -5,5 +5,5 @@ import { CookieService } from './cookie.service'; | ||
private platformId; | ||
private request; | ||
private req; | ||
private readonly isServer; | ||
constructor(cookieService: CookieService, platformId: any, request: Request); | ||
constructor(cookieService: CookieService, platformId: any, req: Request); | ||
/** | ||
@@ -10,0 +10,0 @@ * Return `true` if {@link Document} is accessible, otherwise return `false` |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"CookieService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":15,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":17,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":17},"arguments":[{"__symbolic":"reference","module":"@nguniversal/express-engine/tokens","name":"REQUEST","line":18,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"any"},null,{"__symbolic":"error","message":"Could not resolve type","line":18,"character":50,"context":{"typeName":"Request"},"module":"./lib/cookie.service"}]}],"check":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"getAll":[{"__symbolic":"method"}],"set":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"deleteAll":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ServerCookieService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":16,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":17,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":17},"arguments":[{"__symbolic":"reference","module":"@nguniversal/express-engine/tokens","name":"REQUEST","line":17,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"CookieService"},null,{"__symbolic":"error","message":"Could not resolve type","line":17,"character":50,"context":{"typeName":"Request"},"module":"./lib/server-cookie.service"}]}],"check":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"CookieService":"./lib/cookie.service","ServerCookieService":"./lib/server-cookie.service"},"importAs":"ngx-cookie-service"} | ||
{"__symbolic":"module","version":4,"metadata":{"CookieService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":15,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":15,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":17,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":17},"arguments":[{"__symbolic":"reference","module":"@nguniversal/express-engine/tokens","name":"REQUEST","line":18,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"any"},null,{"__symbolic":"error","message":"Could not resolve type","line":18,"character":50,"context":{"typeName":"Request"},"module":"./lib/cookie.service"}]}],"check":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"getAll":[{"__symbolic":"method"}],"set":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"deleteAll":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ServerCookieService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":16,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":16,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":17,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":17,"character":17},"arguments":[{"__symbolic":"reference","module":"@nguniversal/express-engine/tokens","name":"REQUEST","line":17,"character":24}]}]],"parameters":[{"__symbolic":"reference","name":"CookieService"},null,{"__symbolic":"error","message":"Could not resolve type","line":17,"character":46,"context":{"typeName":"Request"},"module":"./lib/server-cookie.service"}]}],"check":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}},"origins":{"CookieService":"./lib/cookie.service","ServerCookieService":"./lib/server-cookie.service"},"importAs":"ngx-cookie-service"} |
{ | ||
"name": "ngx-cookie-service", | ||
"description": "An (aot ready) angular (4.2+) cookie service", | ||
"version": "12.1.0-rc.1", | ||
"version": "12.1.0-rc.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Stepan Suvorov <stevermeister@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
151312