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

@nguniversal/common

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nguniversal/common - npm Package Compare versions

Comparing version 6.0.0-rc.1 to 6.0.0-rc.2

common_public_index.d.ts

106

bundles/common.umd.js

@@ -1,29 +0,34 @@

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('@nguniversal/common', ['exports', '@angular/common/http', '@angular/core', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
(factory((global.nguniversal = global.nguniversal || {}, global.nguniversal.common = {}),global.ng.common.http,global.ng.core,global.ng.platformBrowser,global.Rx,global.Rx.operators,global.ng.common));
typeof define === 'function' && define.amd ? define(['exports', '@angular/common/http', '@angular/core', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
(factory((global.npm_package = {}),global.ng.common.http,global.ng.core,global.ng.platformBrowser,global.Rx,global.Rx.operators,global.ng.common));
}(this, (function (exports,http,core,platformBrowser,rxjs,operators,common) { 'use strict';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
/**
* @param {?} headers
* @return {?}
*/
var __values = (undefined && undefined.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
};
function getHeadersMap(headers) {
var /** @type {?} */ headersMap = {};
for (var _i = 0, _a = headers.keys(); _i < _a.length; _i++) {
var key = _a[_i];
headersMap[key] = /** @type {?} */ ((headers.getAll(key)));
var headersMap = {};
try {
for (var _a = __values(headers.keys()), _b = _a.next(); !_b.done; _b = _a.next()) {
var key = _b.value;
headersMap[key] = (headers.getAll(key));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_1) throw e_1.error; }
}
return headersMap;
var e_1, _c;
}

@@ -41,25 +46,7 @@ var TransferHttpCacheInterceptor = /** @class */ (function () {

}
/**
* @param {?} url
* @return {?}
*/
TransferHttpCacheInterceptor.prototype.invalidateCacheEntry = /**
* @param {?} url
* @return {?}
*/
function (url) {
TransferHttpCacheInterceptor.prototype.invalidateCacheEntry = function (url) {
this.transferState.remove(platformBrowser.makeStateKey('G.' + url));
this.transferState.remove(platformBrowser.makeStateKey('H.' + url));
};
/**
* @param {?} req
* @param {?} next
* @return {?}
*/
TransferHttpCacheInterceptor.prototype.intercept = /**
* @param {?} req
* @param {?} next
* @return {?}
*/
function (req, next) {
TransferHttpCacheInterceptor.prototype.intercept = function (req, next) {
var _this = this;

@@ -75,7 +62,7 @@ // Stop using the cache if there is a mutating call.

}
var /** @type {?} */ key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
var /** @type {?} */ storeKey = platformBrowser.makeStateKey(key);
var key = (req.method === 'GET' ? 'G.' : 'H.') + req.url;
var storeKey = platformBrowser.makeStateKey(key);
if (this.transferState.hasKey(storeKey)) {
// Request found in cache. Respond using it.
var /** @type {?} */ response = this.transferState.get(storeKey, /** @type {?} */ ({}));
var response = this.transferState.get(storeKey, {});
return rxjs.of(new http.HttpResponse({

@@ -91,3 +78,3 @@ body: response.body,

// Request not found in cache. Make the request and cache it.
var /** @type {?} */ httpEvent = next.handle(req);
var httpEvent = next.handle(req);
return httpEvent

@@ -101,3 +88,3 @@ .pipe(operators.tap(function (event) {

statusText: event.statusText,
url: /** @type {?} */ ((event.url)),
url: (event.url),
});

@@ -109,3 +96,3 @@ }

TransferHttpCacheInterceptor.decorators = [
{ type: core.Injectable },
{ type: core.Injectable }
];

@@ -133,3 +120,3 @@ /** @nocollapse */

],
},] },
},] }
];

@@ -142,13 +129,12 @@ /** @nocollapse */

/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @param {?} doc
* @return {?}
*/
function domContentLoadedFactory(doc) {
return function () {
return new Promise(function (resolve, _reject) {
var /** @type {?} */ contentLoaded = function () {
var contentLoaded = function () {
doc.removeEventListener('DOMContentLoaded', contentLoaded);

@@ -169,3 +155,3 @@ resolve();

]
},] },
},] }
];

@@ -177,6 +163,10 @@ /** @nocollapse */

/**
* Generated bundle index. Do not edit.
*/
exports.ɵnguniversal_modules_common_common_b = domContentLoadedFactory;
exports.ɵnguniversal_modules_common_common_a = TransferHttpCacheInterceptor;
exports.TransferHttpCacheModule = TransferHttpCacheModule;
exports.StateTransferInitializerModule = StateTransferInitializerModule;
exports.ɵb = domContentLoadedFactory;
exports.ɵa = TransferHttpCacheInterceptor;

@@ -183,0 +173,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -0,1 +1,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/common/http","@angular/core","@angular/platform-browser","rxjs","rxjs/operators","@angular/common"],t):t(e.npm_package={},e.ng.common.http,e.ng.core,e.ng.platformBrowser,e.Rx,e.Rx.operators,e.ng.common)}(this,function(e,t,r,n,o,a,s){"use strict";var i=function(){function e(e,t){var r=this;this.transferState=t,this.isCacheActive=!0,e.isStable.pipe(a.filter(function(e){return e}),a.take(1)).toPromise().then(function(){r.isCacheActive=!1})}return e.prototype.invalidateCacheEntry=function(e){this.transferState.remove(n.makeStateKey("G."+e)),this.transferState.remove(n.makeStateKey("H."+e))},e.prototype.intercept=function(e,r){var s=this;if("GET"!==e.method&&"HEAD"!==e.method&&(this.isCacheActive=!1,this.invalidateCacheEntry(e.url)),!this.isCacheActive)return r.handle(e);var i=n.makeStateKey(("GET"===e.method?"G.":"H.")+e.url);if(this.transferState.hasKey(i)){var u=this.transferState.get(i,{});return o.of(new t.HttpResponse({body:u.body,headers:new t.HttpHeaders(u.headers),status:u.status,statusText:u.statusText,url:u.url}))}return r.handle(e).pipe(a.tap(function(e){e instanceof t.HttpResponse&&s.transferState.set(i,{body:e.body,headers:function r(e){var t,r,n={};try{for(var o=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(e.keys()),a=o.next();!a.done;a=o.next()){var s=a.value;n[s]=e.getAll(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}(e.headers),status:e.status,statusText:e.statusText,url:e.url})}))},e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.ApplicationRef},{type:n.TransferState}]},e}(),u=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[n.BrowserTransferStateModule],providers:[i,{provide:t.HTTP_INTERCEPTORS,useExisting:i,multi:!0}]}]}],e.ctorParameters=function(){return[]},e}();
/**

@@ -8,3 +9,2 @@ * @license

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@angular/platform-browser"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@nguniversal/common",["exports","@angular/common/http","@angular/core","@angular/platform-browser","rxjs","rxjs/operators","@angular/common"],t):t((e.nguniversal=e.nguniversal||{},e.nguniversal.common={}),e.ng.common.http,e.ng.core,e.ng.platformBrowser,e.Rx,e.Rx.operators,e.ng.common)}(this,function(e,t,r,n,a,o,s){"use strict";function i(e){for(var t={},r=0,n=e.keys();r<n.length;r++){var a=n[r];t[a]=e.getAll(a)}return t}function u(e){return function(){return new Promise(function(t,r){var n=function(){e.removeEventListener("DOMContentLoaded",n),t()};e.addEventListener("DOMContentLoaded",n)})}}var c=function(){function e(e,t){var r=this;this.transferState=t,this.isCacheActive=!0,e.isStable.pipe(o.filter(function(e){return e}),o.take(1)).toPromise().then(function(){r.isCacheActive=!1})}return e.prototype.invalidateCacheEntry=function(e){this.transferState.remove(n.makeStateKey("G."+e)),this.transferState.remove(n.makeStateKey("H."+e))},e.prototype.intercept=function(e,r){var s=this;if("GET"!==e.method&&"HEAD"!==e.method&&(this.isCacheActive=!1,this.invalidateCacheEntry(e.url)),!this.isCacheActive)return r.handle(e);var u=("GET"===e.method?"G.":"H.")+e.url,c=n.makeStateKey(u);if(this.transferState.hasKey(c)){var f=this.transferState.get(c,{});return a.of(new t.HttpResponse({body:f.body,headers:new t.HttpHeaders(f.headers),status:f.status,statusText:f.statusText,url:f.url}))}return r.handle(e).pipe(o.tap(function(e){e instanceof t.HttpResponse&&s.transferState.set(c,{body:e.body,headers:i(e.headers),status:e.status,statusText:e.statusText,url:e.url})}))},e.decorators=[{type:r.Injectable}],e.ctorParameters=function(){return[{type:r.ApplicationRef},{type:n.TransferState}]},e}(),f=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{imports:[n.BrowserTransferStateModule],providers:[c,{provide:t.HTTP_INTERCEPTORS,useExisting:c,multi:!0}]}]}],e.ctorParameters=function(){return[]},e}(),p=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{providers:[{provide:r.APP_INITIALIZER,multi:!0,useFactory:u,deps:[s.DOCUMENT]}]}]}],e.ctorParameters=function(){return[]},e}();e.TransferHttpCacheModule=f,e.StateTransferInitializerModule=p,e.ɵb=u,e.ɵa=c,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=common.umd.min.js.map
function c(e){return function(){return new Promise(function(t,r){var n=function(){e.removeEventListener("DOMContentLoaded",n),t()};e.addEventListener("DOMContentLoaded",n)})}}var f=function(){function e(){}return e.decorators=[{type:r.NgModule,args:[{providers:[{provide:r.APP_INITIALIZER,multi:!0,useFactory:c,deps:[s.DOCUMENT]}]}]}],e.ctorParameters=function(){return[]},e}();e.ɵnguniversal_modules_common_common_b=c,e.ɵnguniversal_modules_common_common_a=i,e.TransferHttpCacheModule=u,e.StateTransferInitializerModule=f,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "@nguniversal/common",
"version": "6.0.0-rc.1",
"version": "v6.0.0-rc.2",
"description": "Angular Universal common utilities",

@@ -11,5 +11,14 @@ "license": "MIT",

"peerDependencies": {
"@angular/common": "^6.0.0-rc.4",
"@angular/core": "^6.0.0-rc.4"
"@angular/common": "^6.0.0-rc.0",
"@angular/core": "^6.0.0-rc.0"
},
"ng-update": {
"packageGroup": [
"@nguniversal/aspnetcore-engine",
"@nguniversal/common",
"@nguniversal/express-engine",
"@nguniversal/hapi-engine",
"@nguniversal/module-map-ngfactory-loader"
]
},
"repository": {

@@ -22,3 +31,11 @@ "type": "git",

},
"homepage": "https://github.com/angular/universal"
}
"homepage": "https://github.com/angular/universal",
"main": "./bundles/common.umd.js",
"fesm5": "./fesm5/common.js",
"fesm2015": "./fesm2015/common.js",
"esm5": "./esm5/common_public_index.js",
"esm2015": "./esm2015/common_public_index.js",
"typings": "./common_public_index.d.ts",
"module": "./fesm5/common.js",
"es2015": "./fesm2015/common.js"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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